zero as condition in ruby is true
Contact me at LinkedIn  RailsZilla at Facebook  RailsZilla at twitter   google +1  Contact me at Xing  connect me at github

zero as condition in ruby is true

Posted in Ruby

I got mad about this … in Ruby you should work with true and false/nil. Unlike in other languages, Zero in Ruby is true (a friend told me, that in C or C++ zero is false) For example: 12345678910a = 0 while a    # -> 0 is true   #… end while 1   […]

Tags: ,

Copyright © 2011-2018  - RailsZilla – Ruby on Rails tutorials, tips and tricks All rights reserved. | Imprint | Privacy