summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-16 12:54:37 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-16 12:54:37 +0000
commit3cd67ce5053aa53133ae9903e572bd81384d8788 (patch)
treeae8d84f29cf5d5cc5ac10fa59c45139611a25619 /parse.y
parent11e078fb04fd6f3f1627ac46db2caaff69c303a8 (diff)
* parse.y (parser_read_escape, parser_tokadd_escape): allow a hex or
octal encoded character after \c. This seemed to be prohibited at r13836, but its ChangeLog mentions nothing about this prohibition. So I assume this prohibition is not intended. [ruby-core:27229] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 0 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index 7c53b56d64..e69318be08 100644
--- a/parse.y
+++ b/parse.y
@@ -5568,14 +5568,12 @@ parser_read_escape(struct parser_params *parser, int flags,
case '0': case '1': case '2': case '3': /* octal constant */
case '4': case '5': case '6': case '7':
- if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
pushback(c);
c = scan_oct(lex_p, 3, &numlen);
lex_p += numlen;
return c;
case 'x': /* hex constant */
- if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
c = tok_hex(&numlen);
if (numlen == 0) return 0;
return c;
@@ -5648,7 +5646,6 @@ parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp)
case '0': case '1': case '2': case '3': /* octal constant */
case '4': case '5': case '6': case '7':
- if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
{
ruby_scan_oct(--lex_p, 3, &numlen);
if (numlen == 0) goto eof;
@@ -5658,7 +5655,6 @@ parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp)
return 0;
case 'x': /* hex constant */
- if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
{
tok_hex(&numlen);
if (numlen == 0) goto eof;