diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-09-05 22:08:41 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-10-05 23:29:42 +0900 |
commit | d17edf3a170b733356836353508319443d12c53c (patch) | |
tree | 94ccc35d2b289c15276f16c9f1c98454ff5d8102 /spec/ruby | |
parent | f37e6d7f7b9dd0fac4fe01637a410dc4752a7ded (diff) |
[Bug #20705] Update `strtod` implementation
The absence of either the integer or fractional part should be
allowed.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11807
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/core/string/modulo_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/core/string/modulo_spec.rb b/spec/ruby/core/string/modulo_spec.rb index 5d8560000c..8e3853551f 100644 --- a/spec/ruby/core/string/modulo_spec.rb +++ b/spec/ruby/core/string/modulo_spec.rb @@ -749,6 +749,9 @@ describe "String#%" do (format % "-10.4e-20").should == (format % -10.4e-20) (format % ".5").should == (format % 0.5) (format % "-.5").should == (format % -0.5) + ruby_bug("#20705", ""..."3.4") do + (format % "10.").should == (format % 10) + end # Something's strange with this spec: # it works just fine in individual mode, but not when run as part of a group (format % "10_1_0.5_5_5").should == (format % 1010.555) @@ -758,7 +761,6 @@ describe "String#%" do -> { format % "" }.should raise_error(ArgumentError) -> { format % "x" }.should raise_error(ArgumentError) -> { format % "." }.should raise_error(ArgumentError) - -> { format % "10." }.should raise_error(ArgumentError) -> { format % "5x" }.should raise_error(ArgumentError) -> { format % "0b1" }.should raise_error(ArgumentError) -> { format % "10e10.5" }.should raise_error(ArgumentError) |