From 4c6aab03b34f4ae92f376c3346815cb4c32dc240 Mon Sep 17 00:00:00 2001
From: Jim Deville <jdeville@microsoft.com>
Date: Tue, 8 Jul 2008 13:06:04 -0700
Subject: [PATCH] adding bignum spec for bignum divide by float 0.0

---
 1.8/core/bignum/shared/divide.rb |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/1.8/core/bignum/shared/divide.rb b/1.8/core/bignum/shared/divide.rb
index 6e75cbb..7eacdcd 100644
--- a/1.8/core/bignum/shared/divide.rb
+++ b/1.8/core/bignum/shared/divide.rb
@@ -20,6 +20,11 @@ shared :bignum_divide do |cmd|
       lambda { @bignum.send(cmd, 0) }.should raise_error(ZeroDivisionError)
     end
 
+    it "does NOT raise ZeroDivisionError if other is zero and is a Float" do
+      @bignum.send(cmd, 0.0).to_s.should == 'Infinity'
+      @bignum.send(cmd, -0.0).to_s.should == '-Infinity'
+    end
+
     it "raises a TypeError when given a non-Integer" do
       lambda { @bignum.send(cmd, mock('10')) }.should raise_error(TypeError)
       lambda { @bignum.send(cmd, "2") }.should raise_error(TypeError)
-- 
1.5.5.1015.g9d258

