I'm a newbie to Ruby, I have a problem following the Poignant Guide to Ruby:
Does this expression return true?
2005..2009 === 2007
But I don't know why I got this warning message from the following code
wishTraditional.rb:4: warning: integer literal in conditional range
code:
def makTimeLine(year)
if 1984 === year
"Born."
elsif 2005..2009 === year
"Sias."
else
"Sleeping"
end
end
puts makTimeLine(2007)
and the it return Sleeping, which is wrong and should be the Sias
BTW what does the two dots mean? How can I find more information about it?