Skip to content

Commit ed0dd9f

Browse files
committed
Refine test code related unsupported Ruby version
1 parent 3816e76 commit ed0dd9f

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

test/bigdecimal/test_bigdecimal.rb

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,12 +2070,6 @@ def test_new_subclass
20702070
assert_raise_with_message(NoMethodError, /undefined method `new'/) { c.new(1) }
20712071
end
20722072

2073-
def test_to_d
2074-
bug6093 = '[ruby-core:42969]'
2075-
code = "exit(BigDecimal('10.0') == 10.0.to_d)"
2076-
assert_ruby_status(%w[-rbigdecimal -rbigdecimal/util -rmathn -], code, bug6093)
2077-
end if RUBY_VERSION < '2.5' # mathn was removed from Ruby 2.5
2078-
20792073
def test_bug6406
20802074
paths = $LOAD_PATH.map{|path| "-I#{path}" }
20812075
assert_in_out_err([*paths, "-rbigdecimal", "--disable-gems"], <<-EOS, [], [])
@@ -2254,10 +2248,9 @@ def test_n_significant_digits_special
22542248
def test_initialize_copy_dup_clone_frozen_error
22552249
bd = BigDecimal(1)
22562250
bd2 = BigDecimal(2)
2257-
err = RUBY_VERSION >= '2.5' ? FrozenError : TypeError
2258-
assert_raise(err) { bd.send(:initialize_copy, bd2) }
2259-
assert_raise(err) { bd.send(:initialize_clone, bd2) }
2260-
assert_raise(err) { bd.send(:initialize_dup, bd2) }
2251+
assert_raise(FrozenError) { bd.send(:initialize_copy, bd2) }
2252+
assert_raise(FrozenError) { bd.send(:initialize_clone, bd2) }
2253+
assert_raise(FrozenError) { bd.send(:initialize_dup, bd2) }
22612254
end
22622255

22632256
def test_llong_min_gh_200

0 commit comments

Comments
 (0)