diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-12-02 01:50:48 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-12-02 01:50:48 +0900 |
commit | 9da2a5204f32a4f2ce135fddde2abb6e07d647e9 (patch) | |
tree | eef28b08a47f5b8bbfea32524d94bf4f71eb30ec /spec/ruby/core | |
parent | c94cd8534afad86c75f2c7b4f4a2ab4ea2dc4837 (diff) |
[Bug #19087] Merge to "trailing garbage" case
Diffstat (limited to 'spec/ruby/core')
-rw-r--r-- | spec/ruby/core/string/to_c_spec.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/ruby/core/string/to_c_spec.rb b/spec/ruby/core/string/to_c_spec.rb index 489af56a30..edc8a4f14f 100644 --- a/spec/ruby/core/string/to_c_spec.rb +++ b/spec/ruby/core/string/to_c_spec.rb @@ -13,6 +13,9 @@ describe "String#to_c" do it "ignores trailing garbage" do '79+4iruby'.to_c.should == Complex(79, 4) + ruby_bug "[Bug #19087]", ""..."3.2" do + '7__9+4__0i'.to_c.should == Complex(7, 0) + end end it "understands Float::INFINITY" do @@ -24,12 +27,6 @@ describe "String#to_c" do 'NaN'.to_c.should == Complex(0, 0) end - ruby_bug "[Bug #19087]", ""..."3.2" do - it "disallows a sequence of _" do - '7__9+4__0i'.to_c.should == 7 - end - end - it "allows null-byte" do "1-2i\0".to_c.should == Complex(1, -2) "1\0-2i".to_c.should == Complex(1, 0) |