Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Failure to reject invalid float forms with proper message #2126
I believe this is a recent change. This case from mri/ruby/test_syntax should pass:
def test_unexpected_fraction msg = /unexpected fraction/ assert_syntax_error("0x0.0", msg) assert_syntax_error("0b0.0", msg) assert_syntax_error("0d0.0", msg) assert_syntax_error("0o0.0", msg) assert_syntax_error("0.0.0", msg) end
We do reject the first form, but our error message is wrong ("SyntaxError: -e:1: no . floating literal anymore; put 0 before dot"). I'm not sure about the others.