Thursday, April 9, 2009

Rails vrs Ruby Error Messages

Just discovered the following:
irb>nil.foo
NoMethodError: undefined method `foo' for nil:NilClass
from (irb):1

script/console>nil.foo
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.foo
from (irb):2

No comments: