<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,10 @@
 class Hash
   def method_missing(sym, *args)
     method = sym.to_s
-    case method[-1..-1]
-    when &quot;=&quot;
+    if method[-1..-1] == &quot;=&quot;
       self[method[0..-2]] = args[0]
-    when &quot;?&quot;
-      self.has_key?(method[0..-2])      
+    elsif method[-8..-1] == &quot;_exists?&quot;
+      self.has_key?(method[0..-9])
     else
       raise NoMethodError unless self.has_key?(method)
       self[method]</diff>
      <filename>hash.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,4 +18,10 @@ class HashTest &lt; Test::Unit::TestCase
     assert(hash_one.first.second)
   end
 
+  def test_hash_has_method
+    hash_one = { &quot;first&quot; =&gt; nil }
+    assert(hash_one.first_exists?)
+    assert(!hash_one.second_exists?)  
+  end
+
 end
\ No newline at end of file</diff>
      <filename>tests/hash_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9784432e0c46cb1aaf76d713a6a80bfdf6b4f14f</id>
    </parent>
  </parents>
  <author>
    <name>Andrew Chalkley</name>
    <email>andrew@chalkley.org</email>
  </author>
  <url>http://github.com/chalkers/rubyhelpers/commit/71740aa0cf54e0f8f5bf602b9688f530174923b3</url>
  <id>71740aa0cf54e0f8f5bf602b9688f530174923b3</id>
  <committed-date>2009-03-31T16:45:45-07:00</committed-date>
  <authored-date>2009-03-31T16:45:45-07:00</authored-date>
  <message>More hash testing</message>
  <tree>424925af498c050bb3372f9ba74eed3506448d0f</tree>
  <committer>
    <name>Andrew Chalkley</name>
    <email>andrew@chalkley.org</email>
  </committer>
</commit>
