[Bug #19087] Fix an assertion of String#to_c

This commit is contained in:
Nobuyoshi Nakada 2022-12-02 01:47:30 +09:00
parent c0dc717c45
commit c94cd8534a
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -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