This project is archived and is in readonly mode.
Association proxies should correctly respond to method defined via #method_missing
-
Adam Milligan
A fairly trivial amount of investigation made clear that #include? isn't going to cut it, performance-wise. Here is a new patch with a small change. Basically, I introduced a #respond_to? condition into the privacy check; this should short-circuit the conditional expression the vast majority of the time. Only the small remainder of calls will execute the #include? condition as well.
-
Pratik
- Assigned user set to Pratik
If someone is manually overriding method_missing(), they should also be overriding respond_to?() to match the behaviour of method_missing. I imagine that would solve the problem ?
Thanks.
-
Pratik
- Assigned user changed from Pratik to Michael Koziarski
- State changed from new to stale
-
Michael Koziarski
- State changed from stale to wontfix
if you override method_missing you must also override respond_to? otherwise you'll have this problem.
Ditto any other code which checks respond_to? before sending a method.
