Actions
Bug #14206
closedNull-byte ignored inside class/module/method bodies
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin14]
Backport:
Description
I would have expected the following code to not be accepted by the Ruby parser, but instead it acts as if the zero-byte wasn't part of the string.
eval("def m\n\0end")
Changing to a block to start with begin
eval("begin\n\0end")
Produces the expected syntax error
SyntaxError: (eval):2: syntax error, unexpected end-of-input
Actions
Like0
Like0Like0Like0Like0