mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@4e486fa
This commit is contained in:
parent
f4502b001a
commit
34776105c8
46 changed files with 629 additions and 94 deletions
|
@ -112,6 +112,17 @@ describe "Kernel#BigDecimal" do
|
|||
neg_inf.should < 0
|
||||
end
|
||||
|
||||
ruby_version_is "2.6" do
|
||||
describe "with exception: false" do
|
||||
it "returns nil for invalid strings" do
|
||||
BigDecimal("invalid", exception: false).should be_nil
|
||||
BigDecimal("0invalid", exception: false).should be_nil
|
||||
BigDecimal("invalid0", exception: false).should be_nil
|
||||
BigDecimal("0.", exception: false).should be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "accepts NaN and [+-]Infinity as Float values" do
|
||||
it "works without an explicit precision" do
|
||||
BigDecimal(Float::NAN).should.nan?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue