Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
bitwise shift help
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Bertram Scharpf, post: 4656410"] Hi, Am Montag, 04. Jan 2010, 13:38:08 +0900 schrieb Kvetch Kvetch: As in SQL, 0 does not yield false. SQL's NULL is different from 0 and from ''. So is in Ruby `nil' different from 0, from "", and from [], and further from {}. In C you're free to write if (num % 7) { ... } That won't work in Ruby. `Numeric#nonzero?' has been mentioned. Of course, I cannot resist and just mention my beloved proposal of `String#notempty?', `Array#notempty?', and `Hash#notempty?'. `Bertram::NotEmpty#insists?' still returns `true'. Bertram [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
bitwise shift help
Top