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
destructive! operations
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="mark sparshatt, post: 4460484"] ES wrote: The problem with this solution is the new object won't behave like nil in an if expression if ob.not_nil?.do_something code end would run the code when obj is nil There seems to be 2 requirements the nil object shouldn't be changed, in order to not hide any errors the new nil object should behave like nil when tested that's why it can't be done in pure ruby [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
destructive! operations
Top