[Bug #19087] Merge to "trailing garbage" case
This commit is contained in:
parent
c94cd8534a
commit
9da2a5204f
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user