Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine test code related unsupported Ruby version #284

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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