summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-04 04:17:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-04 04:17:26 +0000
commit4f51d814183316c3e97da1dc13cf6945b5a76f2f (patch)
tree3ab2686a359f6cbdda8446d7382f9aa541c2490a /parse.y
parent5a8bfc39f132708bcf3ee2970e9f55ee6d101b65 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y7
1 files changed, 5 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index da36f28d72..460e05508f 100644
--- a/parse.y
+++ b/parse.y
@@ -2627,8 +2627,11 @@ here_document(term, indent)
p++;
}
}
- if (strncmp(eos, p, len) == 0 && (p[len] == '\n' || p[len] == '\r')) {
- break;
+ if (strncmp(eos, p, len) == 0) {
+ if (p[len] == '\n' || p[len] == '\r')
+ break;
+ if (len == RSTRING(line)->len)
+ break;
}
lex_pbeg = lex_p = RSTRING(line)->ptr;