<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,9 @@
 module ActiveSupport
   module Memoizable
+    MEMOIZED_IVAR = Proc.new do |symbol|
+      &quot;@_memoized_#{symbol.to_s.sub(/\?\Z/, '_query').sub(/!\Z/, '_bang')}&quot;.to_sym
+    end
+
     module Freezable
       def self.included(base)
         base.class_eval do
@@ -20,7 +24,7 @@ module ActiveSupport
             if method(m).arity == 0
               __send__($1)
             else
-              ivar = :&quot;@_memoized_#{$1}&quot;
+              ivar = MEMOIZED_IVAR.call($1)
               instance_variable_set(ivar, {})
             end
           end
@@ -30,7 +34,7 @@ module ActiveSupport
       def unmemoize_all
         methods.each do |m|
           if m.to_s =~ /^_unmemoized_(.*)/
-            ivar = :&quot;@_memoized_#{$1}&quot;
+            ivar = MEMOIZED_IVAR.call($1)
             instance_variable_get(ivar).clear if instance_variable_defined?(ivar)
           end
         end
@@ -40,7 +44,7 @@ module ActiveSupport
     def memoize(*symbols)
       symbols.each do |symbol|
         original_method = :&quot;_unmemoized_#{symbol}&quot;
-        memoized_ivar = :&quot;@_memoized_#{symbol.to_s.sub(/\?\Z/, '_query').sub(/!\Z/, '_bang')}&quot;
+        memoized_ivar = MEMOIZED_IVAR.call(symbol)
 
         class_eval &lt;&lt;-EOS, __FILE__, __LINE__
           include Freezable</diff>
      <filename>activesupport/lib/active_support/memoizable.rb</filename>
    </modified>
    <modified>
      <diff>@@ -100,6 +100,11 @@ uses_mocha 'Memoizable' do
 
     def test_memoization_with_punctuation
       assert_equal true, @person.name?
+
+      assert_nothing_raised(NameError) do
+        @person.memoize_all
+        @person.unmemoize_all
+      end
     end
 
     def test_memoization_with_nil_value</diff>
      <filename>activesupport/test/memoizable_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1c75b4fd42c707ce3d539e8453784b4abf74e035</id>
    </parent>
  </parents>
  <author>
    <name>Eugene Pimenov</name>
    <email>libc@mac.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/8603813ac6e1bff8d3addad58d0a56b33baafc59</url>
  <id>8603813ac6e1bff8d3addad58d0a56b33baafc59</id>
  <committed-date>2008-10-05T15:25:58-07:00</committed-date>
  <authored-date>2008-10-05T15:24:52-07:00</authored-date>
  <message>Fix memoize_all for methods with punctuation [#1175 state:resolved]
Signed-off-by: Joshua Peek &lt;josh@joshpeek.com&gt;</message>
  <tree>05e41813fde44b811bc69a4a87f63e74420c5913</tree>
  <committer>
    <name>Joshua Peek</name>
    <email>josh@joshpeek.com</email>
  </committer>
</commit>
