1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

ext/bigdecimal/bigdecimal.c: Backport #2349 [ruby-core:26646]; fix comparisons. Also fix a bunch of bugs that lead to broken-ness and failing tests.

test/bigdecimal/test_bigdecimal.rb: Backport #2349 [ruby-core:26646]; added a test suite.
test/ruby/test_exception.rb: The test suite was breaking ZeroDivisionError, which in turn would break bigdecimal/test_bigdecimal.rb. Made a simple fix that keeps that test but does so non-destructively.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@29025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
wyhaines 2010-08-17 18:27:36 +00:00
parent 2176130373
commit 6f1649e091
6 changed files with 826 additions and 36 deletions

View file

@ -1,6 +1,6 @@
require 'test/unit'
class ZeroDivisionError
class JunkError < ZeroDivisionError
def self.new(message)
42
end
@ -27,7 +27,7 @@ class TestException < Test::Unit::TestCase
end
assert(true)
e = assert_raise(TypeError) { 1/0 }
e = assert_raise(TypeError) { raise JunkError.new("abc") }
assert_equal('exception class/object expected', e.message)
# exception in rescue clause