Updated Rails to 3.1.1 and noticed this 'undocumented deprecation' of try() 
method behavior.

In Rails 3.1.0 and earlier:

nil.try(:method) => allways Nil
object.try(:method) => executes method if defined, or returns Nil if 
NoMethodError exception raised.


In Rail 3.1.1

nil.try(:method) => allways Nil
object.try(:method) => executes method if defined, or raise NoMethodError 
exception directly if just send() method would be called!

That is important deprecation. I think Try should definitely ignore 
NoMethodError.

Now i have to rewrite some code…

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to