Actions
Bug #10117
closedInvalid char does not cause syntax error in eval
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
Updated by nobu (Nobuyoshi Nakada) about 10 years ago
- 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]
Updated by nagachika (Tomoyuki Chikanaga) about 10 years ago
- 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.
Updated by usa (Usaku NAKAMURA) almost 10 years ago
- 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.
Actions
Like0
Like0Like0Like0Like0