<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -24,7 +24,7 @@ describe &quot;BigDecimal#&gt;&quot; do
 
     @values = [@mixed, @pos_int, @neg_int, @pos_frac, @neg_frac,
       -2**32, -2**31, -2**30, -2**16, -2**8, -100, -10, -1,
-      @zero , 1, 2, 10, 2**8, 2**16, 2**32, @int_mock, @zero_pos, @zero_neg]
+      @zero , 1, 2, 10, 10.5, 2**8, 2**16, 2**32, @int_mock, @zero_pos, @zero_neg]
 
     @infinity = BigDecimal(&quot;Infinity&quot;)
     @infinity_neg = BigDecimal(&quot;-Infinity&quot;)
@@ -64,28 +64,24 @@ describe &quot;BigDecimal#&gt;&quot; do
     (@infinity_neg &gt; @infinity).should == false
   end
 
-  it &quot;properly handles NaN values&quot; do
-    @values += [@infinity, @infinity_neg, @nan]
-    @values &lt;&lt; nil
-    @values &lt;&lt; Object.new
-    @values.each { |val|
-      (@nan &gt; val).should == nil
-    }
-
-    lambda { 10 &gt; @nan }.should raise_error(ArgumentError)
-    (10.5 &gt; @nan).should == false
-
-    (@infinity &gt; @nan).should == nil
-    (@infinity_neg &gt; @nan).should == nil
-    (@zero &gt; @nan).should == nil
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;properly handles NaN values&quot; do
+      @values += [@infinity, @infinity_neg, @nan]
+      @values.each { |val|
+        (@nan &gt; val).should == false
+        (val &gt; @nan).should == false
+      }
+    end
   end
 
-  it &quot;returns nil if the argument is nil&quot; do
-    (@zero &gt; nil).should == nil
-    (@infinity &gt; nil).should == nil
-    (@infinity_neg &gt; nil).should == nil
-    (@mixed &gt; nil).should == nil
-    (@pos_int &gt; nil).should == nil
-    (@neg_frac &gt; nil).should == nil
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;raises an ArgumentError if the argument can't be coerced into a BigDecimal&quot; do
+      lambda {@zero         &gt; nil }.should raise_error(ArgumentError)
+      lambda {@infinity     &gt; nil }.should raise_error(ArgumentError)
+      lambda {@infinity_neg &gt; nil }.should raise_error(ArgumentError)
+      lambda {@mixed        &gt; nil }.should raise_error(ArgumentError)
+      lambda {@pos_int      &gt; nil }.should raise_error(ArgumentError)
+      lambda {@neg_frac     &gt; nil }.should raise_error(ArgumentError)
+    end
   end
 end</diff>
      <filename>library/bigdecimal/gt_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@ describe &quot;BigDecimal#&gt;=&quot; do
 
     @values = [@mixed, @pos_int, @neg_int, @pos_frac, @neg_frac,
       -2**32, -2**31, -2**30, -2**16, -2**8, -100, -10, -1,
-      @zero , 1, 2, 10, 2**8, 2**16, 2**32, @int_mock, @zero_pos, @zero_neg]
+      @zero , 1, 2, 10, 10.5, 2**8, 2**16, 2**32, @int_mock, @zero_pos, @zero_neg]
 
     @infinity = BigDecimal(&quot;Infinity&quot;)
     @infinity_neg = BigDecimal(&quot;-Infinity&quot;)
@@ -68,28 +68,24 @@ describe &quot;BigDecimal#&gt;=&quot; do
     (@infinity_neg &gt;= @infinity).should == false
   end
 
-  it &quot;properly handles NaN values&quot; do
-    @values += [@infinity, @infinity_neg, @nan]
-    @values &lt;&lt; nil
-    @values &lt;&lt; Object.new
-    @values.each { |val|
-      (@nan &gt;= val).should == nil
-    }
-
-    lambda { 10 &gt;= @nan }.should raise_error(ArgumentError)
-    (10.5 &gt;= @nan).should == false
-
-    (@infinity &gt;= @nan).should == nil
-    (@infinity_neg &gt;= @nan).should == nil
-    (@zero &gt;= @nan).should == nil
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;properly handles NaN values&quot; do
+      @values += [@infinity, @infinity_neg, @nan]
+      @values.each { |val|
+        (@nan &gt;= val).should == false
+        (val &gt;= @nan).should == false
+      }
+    end
   end
 
-  it &quot;returns nil if the argument is nil&quot; do
-    (@zero &gt;= nil).should == nil
-    (@infinity &gt;= nil).should == nil
-    (@infinity_neg &gt;= nil).should == nil
-    (@mixed &gt;= nil).should == nil
-    (@pos_int &gt;= nil).should == nil
-    (@neg_frac &gt;= nil).should == nil
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;returns nil if the argument is nil&quot; do
+      lambda {@zero         &gt;= nil }.should raise_error(ArgumentError)
+      lambda {@infinity     &gt;= nil }.should raise_error(ArgumentError)
+      lambda {@infinity_neg &gt;= nil }.should raise_error(ArgumentError)
+      lambda {@mixed        &gt;= nil }.should raise_error(ArgumentError)
+      lambda {@pos_int      &gt;= nil }.should raise_error(ArgumentError)
+      lambda {@neg_frac     &gt;= nil }.should raise_error(ArgumentError)
+    end
   end
 end</diff>
      <filename>library/bigdecimal/gte_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@ describe &quot;BigDecimal#&lt;&quot; do
 
     @values = [@mixed, @pos_int, @neg_int, @pos_frac, @neg_frac,
       -2**32, -2**31, -2**30, -2**16, -2**8, -100, -10, -1,
-      @zero , 1, 2, 10, 2**8, 2**16, 2**32, @int_mock, @zero_pos, @zero_neg]
+      @zero , 1, 2, 10, 10.5, 2**8, 2**16, 2**32, @int_mock, @zero_pos, @zero_neg]
 
     @infinity = BigDecimal(&quot;Infinity&quot;)
     @infinity_neg = BigDecimal(&quot;-Infinity&quot;)
@@ -62,28 +62,24 @@ describe &quot;BigDecimal#&lt;&quot; do
     (@infinity_neg &lt; @infinity).should == true
   end
 
-  it &quot;properly handles NaN values&quot; do
-    @values += [@infinity, @infinity_neg, @nan]
-    @values &lt;&lt; nil
-    @values &lt;&lt; Object.new
-    @values.each { |val|
-      (@nan &lt; val).should == nil
-    }
-
-    lambda { 10 &lt; @nan }.should raise_error(ArgumentError)
-    (10.5 &lt; @nan).should == false
-
-    (@infinity &lt; @nan).should == nil
-    (@infinity_neg &lt; @nan).should == nil
-    (@zero &lt; @nan).should == nil
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;properly handles NaN values&quot; do
+      @values += [@infinity, @infinity_neg, @nan]
+      @values.each { |val|
+        (@nan &lt; val).should == false
+        (val &lt; @nan).should == false
+      }
+    end
   end
 
-  it &quot;returns nil if the argument is nil&quot; do
-    (@zero &lt; nil).should == nil
-    (@infinity &lt; nil).should == nil
-    (@infinity_neg &lt; nil).should == nil
-    (@mixed &lt; nil).should == nil
-    (@pos_int &lt; nil).should == nil
-    (@neg_frac &lt; nil).should == nil
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;raises an ArgumentError if the argument can't be coerced into a BigDecimal&quot; do
+      lambda {@zero         &lt; nil }.should raise_error(ArgumentError)
+      lambda {@infinity     &lt; nil }.should raise_error(ArgumentError)
+      lambda {@infinity_neg &lt; nil }.should raise_error(ArgumentError)
+      lambda {@mixed        &lt; nil }.should raise_error(ArgumentError)
+      lambda {@pos_int      &lt; nil }.should raise_error(ArgumentError)
+      lambda {@neg_frac     &lt; nil }.should raise_error(ArgumentError)
+    end
   end
 end</diff>
      <filename>library/bigdecimal/lt_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@ describe &quot;BigDecimal#&lt;=&quot; do
 
     @values = [@mixed, @pos_int, @neg_int, @pos_frac, @neg_frac,
       -2**32, -2**31, -2**30, -2**16, -2**8, -100, -10, -1,
-      @zero , 1, 2, 10, 2**8, 2**16, 2**32, @int_mock, @zero_pos, @zero_neg]
+      @zero , 1, 2, 10, 10.5, 2**8, 2**16, 2**32, @int_mock, @zero_pos, @zero_neg]
 
     @infinity = BigDecimal(&quot;Infinity&quot;)
     @infinity_neg = BigDecimal(&quot;-Infinity&quot;)
@@ -68,28 +68,24 @@ describe &quot;BigDecimal#&lt;=&quot; do
     (@infinity_neg &lt;= @infinity).should == true
   end
 
-  it &quot;properly handles NaN values&quot; do
-    @values += [@infinity, @infinity_neg, @nan]
-    @values &lt;&lt; nil
-    @values &lt;&lt; Object.new
-    @values.each { |val|
-      (@nan &lt;= val).should == nil
-    }
-
-    lambda { 10 &lt;= @nan }.should raise_error(ArgumentError)
-    (10.5 &lt;= @nan).should == false
-
-    (@infinity &lt;= @nan).should == nil
-    (@infinity_neg &lt;= @nan).should == nil
-    (@zero &lt;= @nan).should == nil
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;properly handles NaN values&quot; do
+      @values += [@infinity, @infinity_neg, @nan]
+      @values.each { |val|
+        (@nan &lt;= val).should == false
+        (val &lt;= @nan).should == false
+      }
+    end
   end
 
-  it &quot;returns nil if the argument is nil&quot; do
-    (@zero &lt;= nil).should == nil
-    (@infinity &lt;= nil).should == nil
-    (@infinity_neg &lt;= nil).should == nil
-    (@mixed &lt;= nil).should == nil
-    (@pos_int &lt;= nil).should == nil
-    (@neg_frac &lt;= nil).should == nil
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;raises an ArgumentError if the argument can't be coerced into a BigDecimal&quot; do
+      lambda {@zero         &lt;= nil }.should raise_error(ArgumentError)
+      lambda {@infinity     &lt;= nil }.should raise_error(ArgumentError)
+      lambda {@infinity_neg &lt;= nil }.should raise_error(ArgumentError)
+      lambda {@mixed        &lt;= nil }.should raise_error(ArgumentError)
+      lambda {@pos_int      &lt;= nil }.should raise_error(ArgumentError)
+      lambda {@neg_frac     &lt;= nil }.should raise_error(ArgumentError)
+    end
   end
 end</diff>
      <filename>library/bigdecimal/lte_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@ describe :bigdecimal_eql, :shared =&gt; true do
     @infinity_minus = BigDecimal(&quot;-Infinity&quot;)
   end
 
-  it &quot;test for equality&quot; do
+  it &quot;tests for equality&quot; do
     @bg6543_21.send(@method, @bg6543_21).should == true
     @a.send(@method, @a).should == true
     @a.send(@method, @b).should == false
@@ -20,14 +20,16 @@ describe :bigdecimal_eql, :shared =&gt; true do
     @bigint.send(@method, 1000).should == true
   end
 
-  it &quot;NaN is never equal to any number&quot; do
-    @nan.send(@method, @nan).should_not == true
-    @a.send(@method, @nan).should_not == true
-    @nan.send(@method, @a).should_not == true
-    @nan.send(@method, @infinity).should_not == true
-    @nan.send(@method, @infinity_minus).should_not == true
-    @infinity.send(@method, @nan).should_not == true
-    @infinity_minus.send(@method, @nan).should_not == true
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;NaN is never equal to any number&quot; do
+      @nan.send(@method, @nan).should == false
+      @a.send(@method, @nan).should == false
+      @nan.send(@method, @a).should == false
+      @nan.send(@method, @infinity).should == false
+      @nan.send(@method, @infinity_minus).should == false
+      @infinity.send(@method, @nan).should == false
+      @infinity_minus.send(@method, @nan).should == false
+    end
   end
 
   it &quot;returns true for infinity values with the same sign&quot; do
@@ -40,16 +42,24 @@ describe :bigdecimal_eql, :shared =&gt; true do
     BigDecimal(&quot;-Infinity&quot;).send(@method, @infinity_minus).should == true
   end
 
-  it &quot;does not return true for infinity values with different signs&quot; do
-    @infinity.send(@method, @infinity_minus).should_not == true
-    @infinity_minus.send(@method, @infinity).should_not == true
+  it &quot;returns false for infinity values with different signs&quot; do
+    @infinity.send(@method, @infinity_minus).should == false
+    @infinity_minus.send(@method, @infinity).should == false
   end
 
-  it &quot;does not return true when ininite value compared to finite one&quot; do
-    @infinity.send(@method, @a).should_not == true
-    @infinity_minus.send(@method, @a).should_not == true
+  it &quot;returns false when infinite value compared to finite one&quot; do
+    @infinity.send(@method, @a).should == false
+    @infinity_minus.send(@method, @a).should == false
 
-    @a.send(@method, @infinity).should_not == true
-    @a.send(@method, @infinity_minus).should_not == true
+    @a.send(@method, @infinity).should == false
+    @a.send(@method, @infinity_minus).should == false
+  end
+
+  ruby_bug &quot;redmine:2349&quot;, &quot;1.8.7&quot; do
+    it &quot;returns false when compared objects that can not be coerced into BigDecimal&quot; do
+      @infinity.send(@method, nil).should == false
+      @bigint.send(@method, nil).should == false
+      @nan.send(@method, nil).should == false
+    end
   end
 end</diff>
      <filename>library/bigdecimal/shared/eql.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>91dbc0ddd01e609048b64c94e6b2d9d7cc244dad</id>
    </parent>
  </parents>
  <author>
    <name>Marc-Andre Lafortune</name>
    <email>github@marc-andre.ca</email>
  </author>
  <url>http://github.com/rubyspec/rubyspec/commit/d2f7130b65ec94ba110a6b405d348e1c4138f956</url>
  <id>d2f7130b65ec94ba110a6b405d348e1c4138f956</id>
  <committed-date>2009-11-08T22:37:45-08:00</committed-date>
  <authored-date>2009-11-08T22:37:08-08:00</authored-date>
  <message>lib/bigdecimal: Fix comparison specs (redmine:2349)</message>
  <tree>b5feec3fb9221073c7f6558d66d16097e4a86840</tree>
  <committer>
    <name>Marc-Andre Lafortune</name>
    <email>github@marc-andre.ca</email>
  </committer>
</commit>
