ruby-changes:69332
From: Hiroshi <ko1@a...>
Date: Fri, 22 Oct 2021 16:00:15 +0900 (JST)
Subject: [ruby-changes:69332] 93691d0752 (master): Import bigdecimal-3.1.0.dev
https://git.ruby-lang.org/ruby.git/commit/?id=93691d0752 From 93691d07525773b4b77eeaba347e8d910ab3dcbb Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Fri, 22 Oct 2021 13:04:42 +0900 Subject: Import bigdecimal-3.1.0.dev --- ext/bigdecimal/bigdecimal.gemspec | 10 ++-------- test/bigdecimal/test_bigdecimal.rb | 6 ++---- test/bigdecimal/test_ractor.rb | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec index 79009aa19b..bb4610cbbd 100644 --- a/ext/bigdecimal/bigdecimal.gemspec +++ b/ext/bigdecimal/bigdecimal.gemspec @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/bigdecimal.gemspec#L1 # coding: utf-8 -bigdecimal_version = '3.0.0' +bigdecimal_version = '3.1.0.dev' Gem::Specification.new do |s| s.name = "bigdecimal" @@ -36,11 +36,5 @@ Gem::Specification.new do |s| https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/bigdecimal.gemspec#L36 sample/pi.rb ] - s.required_ruby_version = Gem::Requirement.new(">= 2.4.0") - - s.add_development_dependency "fiddle" - s.add_development_dependency "rake", ">= 12.3.3" - s.add_development_dependency "rake-compiler", ">= 0.9" - s.add_development_dependency "minitest", "< 5.0.0" - s.add_development_dependency "irb" + s.required_ruby_version = Gem::Requirement.new(">= 2.5.0") end diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb index 99f92c461c..49e6b2a70e 100644 --- a/test/bigdecimal/test_bigdecimal.rb +++ b/test/bigdecimal/test_bigdecimal.rb @@ -146,6 +146,7 @@ class TestBigDecimal < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/bigdecimal/test_bigdecimal.rb#L146 def test_BigDecimal_with_float assert_equal(BigDecimal("0.1235"), BigDecimal(0.1234567, 4)) assert_equal(BigDecimal("-0.1235"), BigDecimal(-0.1234567, 4)) + assert_equal(BigDecimal("0.01"), BigDecimal(0.01, Float::DIG + 1)) assert_raise_with_message(ArgumentError, "can't omit precision for a Float.") { BigDecimal(4.2) } assert_raise(ArgumentError) { BigDecimal(0.1, Float::DIG + 2) } assert_nothing_raised { BigDecimal(0.1, Float::DIG + 1) } @@ -656,13 +657,10 @@ class TestBigDecimal < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/bigdecimal/test_bigdecimal.rb#L657 end def test_precs_deprecated - saved = Warning[:deprecated] - Warning[:deprecated] = true assert_warn(/BigDecimal#precs is deprecated and will be removed in the future/) do + Warning[:deprecated] = true if defined?(Warning.[]) BigDecimal("1").precs end - ensure - Warning[:deprecated] = saved end def test_precs diff --git a/test/bigdecimal/test_ractor.rb b/test/bigdecimal/test_ractor.rb index f78663f15e..798cc494e1 100644 --- a/test/bigdecimal/test_ractor.rb +++ b/test/bigdecimal/test_ractor.rb @@ -6,7 +6,7 @@ class TestBigDecimalRactor < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/bigdecimal/test_ractor.rb#L6 def setup super - skip unless defined? Ractor + omit unless defined? Ractor end def test_ractor_shareable -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/