From c94cd8534afad86c75f2c7b4f4a2ab4ea2dc4837 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 2 Dec 2022 01:47:30 +0900 Subject: [PATCH] [Bug #19087] Fix an assertion of `String#to_c` --- spec/ruby/core/string/to_c_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/ruby/core/string/to_c_spec.rb b/spec/ruby/core/string/to_c_spec.rb index 994bdf99f6..489af56a30 100644 --- a/spec/ruby/core/string/to_c_spec.rb +++ b/spec/ruby/core/string/to_c_spec.rb @@ -24,8 +24,10 @@ describe "String#to_c" do 'NaN'.to_c.should == Complex(0, 0) end - it "understands a sequence of _" do - '7__9+4__0i'.to_c.should == Complex(79, 40) + 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