This project is archived and is in readonly mode.
memoize_all fails when method has ? or ! at the end and arity > 0
Reported by Eugene Pimenov | October 5th, 2008 @ 01:02 AM | in 2.x
Steps to reproduce:
1) define a class
klass = Class.new
klass.class_eval do
extend ActiveSupport::Memoizable
def can_memoize_question?(args)
args
end
memoize :can_memoize_question?
def memoize_bang!(args)
args
end
memoize :memoize_bang!
end
2) memoize_all
klass.new.memoize_all
3) delight the error
NameError: `@_memoized_memoize_bang!' is not allowed as an instance variable name
Comments and changes to this ticket
-
josh October 5th, 2008 @ 03:08 PM
- Assigned user set to josh
- State changed from new to open
-
Repository October 5th, 2008 @ 11:26 PM
- State changed from open to resolved
(from [8603813ac6e1bff8d3addad58d0a56b33baafc59]) Fix memoize_all for methods with punctuation [#1175 state:resolved] Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
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>
People watching this ticket
Attachments
Tags
Referenced by
- 1175 memoize_all fails when method has ? or ! at the end and arity > 0 (from [8603813ac6e1bff8d3addad58d0a56b33baafc59]) Fix mem...