summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
commit6d583574ab87c7cd18b66382c6892b545167bff6 (patch)
tree515b7c169ce2cd30fe085c5d861f5fad59aa76f7 /parse.y
parente299d511db939232c628d6880e61c32e83937d66 (diff)
1.1d1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1dev@357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y11
1 files changed, 10 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 2fc4de40e9..31159a840c 100644
--- a/parse.y
+++ b/parse.y
@@ -1679,6 +1679,7 @@ lex_get_str(s)
beg = RSTRING(s)->ptr;
if (lex_gets_ptr) {
+ if (RSTRING(s)->len == lex_gets_ptr) return Qnil;
beg += lex_gets_ptr;
}
pend = RSTRING(s)->ptr + RSTRING(s)->len;
@@ -2246,7 +2247,8 @@ here_document(term, indent)
int c;
char *eos, *p;
int len;
- VALUE str, line;
+ VALUE str;
+ volatile VALUE line;
char *save_beg, *save_end, *save_lexp;
NODE *list = 0;
int linesave = ruby_sourceline;
@@ -2307,6 +2309,13 @@ here_document(term, indent)
lex_pbeg = lex_p = RSTRING(line)->ptr;
lex_pend = lex_p + RSTRING(line)->len;
+#if 0
+ if (indent) {
+ while (*lex_p && *lex_p == '\t') {
+ lex_p++;
+ }
+ }
+#endif
switch (parse_string(term, '\n', '\n')) {
case tSTRING:
case tXSTRING: