diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-24 22:54:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-24 22:54:00 +0000 |
commit | 785521bd5133501c7315c5aace783a8d8ef6b5ac (patch) | |
tree | e3c951a31d579ea07445f3d9c84c3f0e1b6df5a7 /parse.y | |
parent | eec0b2d88a68d7931ff1d41c5cc2c773f7f22c6c (diff) | |
download | ruby-785521bd5133501c7315c5aace783a8d8ef6b5ac.tar.gz |
* parse.y (parser_tokadd_string): insert a backslash only if
quoted by single quotes. [ruby-dev:45281] [Bug #6069]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -6507,7 +6507,7 @@ parser_tokadd_string(struct parser_params *parser, default: if (c == -1) return -1; if (!ISASCII(c)) { - tokadd('\\'); + if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); goto non_ascii; } if (func & STR_FUNC_REGEXP) { @@ -7597,7 +7597,6 @@ parser_yylex(struct parser_params *parser) } else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { nextc(); - tokadd('\\'); if (tokadd_mbchar(c) == -1) return 0; } else { |