Skip to content

Commit

Permalink
[Bug #19087] Fix an assertion of String#to_c
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 1, 2022
1 parent c0dc717 commit c94cd85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/ruby/core/string/to_c_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
'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
Expand Down

0 comments on commit c94cd85

Please sign in to comment.