diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-29 18:40:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-29 18:40:48 +0000 |
commit | 106b437ceb2795d9f9289f50b02cd38c4285790d (patch) | |
tree | ba6d5def169ca6d421c594bcb74db508237a243c /parse.y | |
parent | 6cb380e698e6b8f5b48257869bda1af8fafd39a3 (diff) |
* parse.y (parser_tokadd_utf8, parser_tokadd_string): allow NUL
containing symbol literals, as well as String#to_sym.
[ruby-dev:41447]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -5487,11 +5487,6 @@ parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, if (string_literal) tokaddmbc(codepoint, *encp); } else if (string_literal) { - if (codepoint == 0 && symbol_literal) { - yyerror("symbol cannot contain '\\u{0}'"); - return 0; - } - tokadd(codepoint); } } while (string_literal && (peek(' ') || peek('\t'))); @@ -5519,11 +5514,6 @@ parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, if (string_literal) tokaddmbc(codepoint, *encp); } else if (string_literal) { - if (codepoint == 0 && symbol_literal) { - yyerror("symbol cannot contain '\\u0000'"); - return 0; - } - tokadd(codepoint); } } @@ -5883,11 +5873,6 @@ parser_tokadd_string(struct parser_params *parser, pushback(c); break; } - if (!c && (func & STR_FUNC_SYMBOL)) { - func &= ~STR_FUNC_SYMBOL; - compile_error(PARSER_ARG "symbol cannot contain '\\0'"); - continue; - } if (c & 0x80) { has_nonascii = 1; if (enc != *encp) { |