зеркало из https://github.com/github/ruby.git
Import bigdecimal-3.1.0.dev
This commit is contained in:
Родитель
22a7f7ec5a
Коммит
93691d0752
|
@ -1,6 +1,6 @@
|
|||
# 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|
|
|||
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
|
||||
|
|
|
@ -146,6 +146,7 @@ class TestBigDecimal < Test::Unit::TestCase
|
|||
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
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@ class TestBigDecimalRactor < Test::Unit::TestCase
|
|||
|
||||
def setup
|
||||
super
|
||||
skip unless defined? Ractor
|
||||
omit unless defined? Ractor
|
||||
end
|
||||
|
||||
def test_ractor_shareable
|
||||
|
|
Загрузка…
Ссылка в новой задаче