L
Levin Alexander
Hi,
I just got an Exception that I found somewhat confusing:
$ ruby -e "puts((1..10).include?('a'))"
true
$ ruby -e "puts(('a'..'z').include?(1))"
-e:1:in `include?': undefined method `>' for false:FalseClass =20
(NoMethodError)
from -e:1
$ ruby -v
ruby 1.8.2 (2004-12-23) [i386-linux]
Is there a reason for this behaviour?
Thank You,
Levin
I just got an Exception that I found somewhat confusing:
$ ruby -e "puts((1..10).include?('a'))"
true
$ ruby -e "puts(('a'..'z').include?(1))"
-e:1:in `include?': undefined method `>' for false:FalseClass =20
(NoMethodError)
from -e:1
$ ruby -v
ruby 1.8.2 (2004-12-23) [i386-linux]
Is there a reason for this behaviour?
Thank You,
Levin