<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,8 +8,7 @@ module Spec
         end
 
         def [](key)
-          return false if assigns[key] == false
-          return false if assigns[key.to_s] == false
+          return false if false == assigns[key] || false == assigns[key.to_s]
           assigns[key] || assigns[key.to_s] || @target.instance_variable_get(&quot;@#{key}&quot;)
         end
 </diff>
      <filename>lib/spec/rails/example/assigns_hash_proxy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,14 +5,27 @@ describe &quot;AssignsHashProxy&quot; do
     @object.assigns
   end
   
+  class Foo
+    def initialize(bar)
+      @bar = bar
+    end
+    attr_reader :bar
+
+    def ==(other)
+      self.bar == other.bar
+    end
+  end
+
   before(:each) do
     @object = Class.new do
-      attr_accessor :assigns
+      def assigns; @assigns ||= Hash.new; end
     end.new
-    @object.assigns = Hash.new
-    @proxy = Spec::Rails::Example::AssignsHashProxy.new self do
-      @object
-    end
+    @proxy = Spec::Rails::Example::AssignsHashProxy.new(self) {@object}
+  end
+  
+  it &quot;doesn't wig out on objects that define their own == method&quot; do
+    @object.assigns['foo'] = Foo.new(1)
+    @proxy['foo'].should == Foo.new(1)
   end
   
   it &quot;should set ivars on object using string&quot; do</diff>
      <filename>spec/spec/rails/example/assigns_hash_proxy_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>333810bf6f062599bd39007a3fe32ba227a4b32a</id>
    </parent>
  </parents>
  <author>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </author>
  <url>http://github.com/dchelimsky/rspec-rails/commit/91b9240c55c4ceca40ebf1ca8035f8924427e819</url>
  <id>91b9240c55c4ceca40ebf1ca8035f8924427e819</id>
  <committed-date>2009-02-11T21:30:27-08:00</committed-date>
  <authored-date>2009-02-11T21:22:17-08:00</authored-date>
  <message>Fixed bug whhere accessing an object via assigns would raise an error
about FalseClass not implementing a method if the object in question
overrode == with attribute comparisons against the other object.</message>
  <tree>d2d90bc34d7da1d7dbee0105750c58df8f4fe522</tree>
  <committer>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </committer>
</commit>
