<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,8 +5,14 @@ module SimpleMemoize
     def memoize(*method_names)
       method_names.each do |method_name|
         method_name = method_name.to_s
-        memoized_method_name = &quot;#{method_name}_with_memo&quot;
-        regular_method_name  = &quot;#{method_name}_without_memo&quot;
+        stripped_method_name = method_name.sub(/([!?])$/, '')
+
+        punctuation = $1
+        wordy_punctuation = (punctuation == '!' ? '_bang' : '_huh') if punctuation
+        ivar_name = &quot;@#{stripped_method_name}#{wordy_punctuation}&quot;
+
+        memoized_method_name = &quot;#{stripped_method_name}_with_memo#{punctuation}&quot;
+        regular_method_name  = &quot;#{stripped_method_name}_without_memo#{punctuation}&quot;
 
         unless (instance_methods + private_instance_methods).include?(method_name)
           raise NoMethodError, &quot;The Method '#{method_name}' cannot be memoized because it doesn't exist in #{self}&quot;
@@ -15,10 +21,10 @@ module SimpleMemoize
     
         self.class_eval &quot;
           def #{memoized_method_name}(*args)
-            if defined?(@#{method_name})
-              @#{method_name}
+            if defined?(#{ivar_name})
+              #{ivar_name}
             else
-              @#{method_name} = #{regular_method_name}(*args)
+              #{ivar_name} = #{regular_method_name}(*args)
             end
           end
 </diff>
      <filename>lib/simple_memoize.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@ module Barks
     'Grrrrr'
   end
   memoize :growl
-  
+
   def muzzle
     @growl = false
   end
@@ -41,7 +41,12 @@ class Dog
     'slurp'
   end
   memoize :drink
-  
+
+  def hungry?
+    true
+  end
+  memoize :hungry?
+
   class &lt;&lt; self
     def breeds
       ['doberman', 'dalmatian']
@@ -56,6 +61,12 @@ class SimpleMemoizeTest &lt; Test::Unit::TestCase
     dog.expects(:growl_without_memo).returns('Grrrrr').once
     4.times { dog.growl }
   end
+
+  def test_method_punctuation_carried_to_end_of_method
+    dog = Dog.new
+    dog.expects(:hungry_without_memo?).returns(true).once
+    4.times { dog.hungry? }
+  end
   
   def test_module_mehthod_only_calls_memoized_once_for_non_truthy_result
     dog = Dog.new</diff>
      <filename>test/test_simple_memoize.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>18693d0b5a7a642a242c51e052fe786d7d8cff2d</id>
    </parent>
  </parents>
  <author>
    <name>Brad Ediger</name>
    <email>brad.ediger@madriska.com</email>
  </author>
  <url>http://github.com/JackDanger/simple_memoize/commit/e9e03afe7ba7c93b9afbf553af0b90db2b103bd4</url>
  <id>e9e03afe7ba7c93b9afbf553af0b90db2b103bd4</id>
  <committed-date>2008-12-16T15:29:15-08:00</committed-date>
  <authored-date>2008-12-16T15:29:15-08:00</authored-date>
  <message>Added support for methods with names ending in punctuation</message>
  <tree>da56f14c47b1089c745e674c6998e5dbc25941ea</tree>
  <committer>
    <name>Brad Ediger</name>
    <email>brad.ediger@madriska.com</email>
  </committer>
</commit>
