Bug #10117
closed
Invalid char does not cause syntax error in eval
Added by nobu (Nobuyoshi Nakada) about 10 years ago.
Updated almost 10 years ago.
Description
Directly coded invalid char causes SyntaxError
, but not in eval
.
無効な文字を直接書いたときにはSyntaxError
になりますが、eval
の中ではなりません。
$ ruby -e $'\x01'
-e:1: Invalid char `\x01' in expression
bash: exit 1
$ ruby -e 'p eval("\x01")'
nil
bash: exit 1
- Description updated (diff)
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r47098.
parse.y: fix invalid char in eval
- parse.y (parser_yylex): fix invalid char in eval, should raise
an syntax error too, as well as directly coded.
[ruby-core:64243] [Bug #10117]
- Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE
Backported into ruby_2_1
branch at r47268.
- Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE
backported into ruby_2_0_0
at r47403.
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0