From e168b64b03403fb4efbd8dcbbdaeed83710b4d39 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 4 Sep 2003 14:59:43 +0000 Subject: [PATCH] * parse.y (tokadd_string): newlines have no special meanings in %w/%W, otherwise they are ignored only when interpolation is enabled. [ruby-dev:21325] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ parse.y | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a3295f015c..bbf1e1075e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Sep 4 23:59:40 2003 Nobuyoshi Nakada + + * parse.y (tokadd_string): newlines have no special meanings in + %w/%W, otherwise they are ignored only when interpolation is + enabled. [ruby-dev:21325] + Wed Sep 4 19:38:25 2003 NAKAMURA, Hiroshi * ext/io/wait/.cvsignore: added. diff --git a/parse.y b/parse.y index 917a92b7ef..35a94c9e89 100644 --- a/parse.y +++ b/parse.y @@ -2999,7 +2999,10 @@ tokadd_string(func, term, paren, nest) } switch (c) { case '\n': - continue; + if (func & STR_FUNC_QWORDS) break; + if (func & STR_FUNC_EXPAND) continue; + tokadd('\\'); + break; case '\\': if (func & STR_FUNC_ESCAPE) tokadd(c);