This project is archived and is in readonly mode.

#1175 ✓resolved
Eugene Pimenov

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

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

Referenced by

Pages