diff options
Diffstat (limited to 'spec/ruby/core/float/divide_spec.rb')
| -rw-r--r-- | spec/ruby/core/float/divide_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/ruby/core/float/divide_spec.rb b/spec/ruby/core/float/divide_spec.rb index f41b9f1f93..72ab7527bd 100644 --- a/spec/ruby/core/float/divide_spec.rb +++ b/spec/ruby/core/float/divide_spec.rb @@ -33,7 +33,11 @@ describe "Float#/" do end it "raises a TypeError when given a non-Numeric" do - lambda { 13.0 / "10" }.should raise_error(TypeError) - lambda { 13.0 / :symbol }.should raise_error(TypeError) + -> { 13.0 / "10" }.should raise_error(TypeError) + -> { 13.0 / :symbol }.should raise_error(TypeError) + end + + it "divides correctly by Rational numbers" do + (1.2345678901234567 / Rational(1, 10000000000000000000)).should == 1.2345678901234567e+19 end end |
