This project is archived and is in readonly mode.
Regression on 2.3 branch: Allow delegating methods to nil
Reported by Bryan Helmkamp | August 10th, 2009 @ 11:38 PM
ActiveSupport's #delegate feature doesn't handle delegating to nil well, and there was recently a regression in this commit to add better exceptions: http://github.com/rails/rails/commit/63cc6b7242993a5c4d96df4479a4ad...
The patch improves behavior for both the allow_nil and the non-allow_nil cases, where methods that actually exist on nil will be called properly.
Patch with tests is here: http://github.com/brynary/rails/tree/delegate-to-nil
Comments and changes to this ticket
-
CancelProfileIsBroken September 25th, 2009 @ 12:55 PM
- Tag set to bugmash
-
Bryan Helmkamp September 25th, 2009 @ 03:21 PM
This is fixed in master, and I believe it can be closed out.
-
Elad Meidar September 26th, 2009 @ 02:25 AM
Bryan, can you supply a patch within a single file? please ? :)
-
Pratik January 17th, 2010 @ 07:01 PM
- State changed from new to resolved
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>