Skip to content

Commit

Permalink
Merge pull request #284 from ruby/drop-2-5-related-code
Browse files Browse the repository at this point in the history
Refine test code related unsupported Ruby version
  • Loading branch information
hsbt committed Jan 18, 2024
2 parents b98e92f + ed0dd9f commit d90feaa
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions test/bigdecimal/test_bigdecimal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2070,12 +2070,6 @@ def test_new_subclass
assert_raise_with_message(NoMethodError, /undefined method `new'/) { c.new(1) }
end

def test_to_d
bug6093 = '[ruby-core:42969]'
code = "exit(BigDecimal('10.0') == 10.0.to_d)"
assert_ruby_status(%w[-rbigdecimal -rbigdecimal/util -rmathn -], code, bug6093)
end if RUBY_VERSION < '2.5' # mathn was removed from Ruby 2.5

def test_bug6406
paths = $LOAD_PATH.map{|path| "-I#{path}" }
assert_in_out_err([*paths, "-rbigdecimal", "--disable-gems"], <<-EOS, [], [])
Expand Down Expand Up @@ -2254,10 +2248,9 @@ def test_n_significant_digits_special
def test_initialize_copy_dup_clone_frozen_error
bd = BigDecimal(1)
bd2 = BigDecimal(2)
err = RUBY_VERSION >= '2.5' ? FrozenError : TypeError
assert_raise(err) { bd.send(:initialize_copy, bd2) }
assert_raise(err) { bd.send(:initialize_clone, bd2) }
assert_raise(err) { bd.send(:initialize_dup, bd2) }
assert_raise(FrozenError) { bd.send(:initialize_copy, bd2) }
assert_raise(FrozenError) { bd.send(:initialize_clone, bd2) }
assert_raise(FrozenError) { bd.send(:initialize_dup, bd2) }
end

def test_llong_min_gh_200
Expand Down

0 comments on commit d90feaa

Please sign in to comment.