Suppress deprecation warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
308360f13b
commit
cbcc148eaf
@ -1,4 +1,5 @@
|
||||
extconf.h: $(srcdir)/$(GEMSPEC)
|
||||
Makefile: $(srcdir)/lib/bigdecimal.rb
|
||||
|
||||
# AUTOGENERATED DEPENDENCIES START
|
||||
bigdecimal.o: $(RUBY_EXTCONF_H)
|
||||
|
@ -219,11 +219,14 @@ class TestBigDecimal < Test::Unit::TestCase
|
||||
def test_s_new
|
||||
# TODO: BigDecimal.new will be removed on 1.5
|
||||
# assert_raise_with_message(NoMethodError, /undefined method `new'/) { BigDecimal.new("1") }
|
||||
verbose, $VERBOSE = $VERBOSE, nil
|
||||
assert_equal(BigDecimal(1), BigDecimal.new(1))
|
||||
assert_raise(ArgumentError) { BigDecimal.new(',', exception: true) }
|
||||
assert_nothing_raised { assert_equal(nil, BigDecimal.new(',', exception: false)) }
|
||||
assert_raise(TypeError) { BigDecimal.new(nil, exception: true) }
|
||||
assert_nothing_raised { assert_equal(nil, BigDecimal.new(nil, exception: false)) }
|
||||
ensure
|
||||
$VERBOSE = verbose
|
||||
end
|
||||
|
||||
def _test_mode(type)
|
||||
@ -1829,11 +1832,14 @@ class TestBigDecimal < Test::Unit::TestCase
|
||||
c = Class.new(BigDecimal)
|
||||
# TODO: BigDecimal.new will be removed on 1.5
|
||||
# assert_raise_with_message(NoMethodError, /undefined method `new'/) { c.new(1) }
|
||||
verbose, $VERBOSE = $VERBOSE, nil
|
||||
assert_equal(BigDecimal(1), c.new(1))
|
||||
assert_raise(ArgumentError) { c.new(',', exception: true) }
|
||||
assert_nothing_raised { assert_equal(nil, c.new(',', exception: false)) }
|
||||
assert_raise(TypeError) { c.new(nil, exception: true) }
|
||||
assert_nothing_raised { assert_equal(nil, c.new(nil, exception: false)) }
|
||||
ensure
|
||||
$VERBOSE = verbose
|
||||
end
|
||||
|
||||
def test_to_d
|
||||
|
Loading…
x
Reference in New Issue
Block a user