summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-26 23:29:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-26 23:29:10 +0000
commit264d2e4da91c6c8fe04442b447647726710e0cde (patch)
tree4b1b03e81f40c3a08e3e5201e096865351a2ff8f
parent0fdfc0bbef8f28882ec2f8946a76ee31497ee5c6 (diff)
* parse.y (literal_concat_string): non-string last expression in
#{} was ignored when followed by literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--parse.y5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f6715856a..20b30a5b87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 27 08:28:18 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
+
+ * parse.y (literal_concat_string): non-string last expression in
+ #{} was ignored when followed by literal.
+
Wed Jun 26 15:40:00 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* parse.y (words, qwords): word list literal rules.
diff --git a/parse.y b/parse.y
index b20f941fb4..ef6b507d23 100644
--- a/parse.y
+++ b/parse.y
@@ -4359,7 +4359,7 @@ literal_concat_string(head, tail, str)
NODE *head, *tail;
VALUE str;
{
- NODE *last = head, *last1 = 0;
+ NODE *last = head, *last1 = 0, *prev = 0;
for (;;) {
switch (nd_type(last)) {
@@ -4368,10 +4368,11 @@ literal_concat_string(head, tail, str)
break;
case NODE_BLOCK:
case NODE_DSTR:
+ if (!last1) last1 = prev;
+ prev = last;
while (last->nd_next) {
last = last->nd_next;
}
- if (!last1) last1 = last;
last = last->nd_head;
break;
case NODE_STR: