Why am I seeing different results for two expressions in Ruby, one uses '&&', other uses 'and' opera

Posted by Shekhar on Stack Overflow See other posts from Stack Overflow or by Shekhar
Published on 2010-05-14T06:29:31Z Indexed on 2010/05/14 6:34 UTC
Read the original article Hit count: 227

Filed under:
|

print (-1 == -1) and (myobj.nil?) true=> nil

print (-1 == -1) && (myobj.nil?) false=> nil

© Stack Overflow or respective owner

Related posts about ruby

Related posts about expressions