aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-24 08:21:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-24 08:21:04 +0000
commit271f6d68d64588b15f5c056736509595d5b15d6b (patch)
treeb86fe742635cbb45f735cc8380ea1ff86797b4e5 /parse.y
parentb14bfba2e98b8837b842397aa13ce76bbb44b034 (diff)
downloadruby-271f6d68d64588b15f5c056736509595d5b15d6b.tar.gz
parse without $.
* io.c (rb_io_gets_internal): read one line from an IO without setting ARGF.lineno. * parse.y (lex_io_gets): use rb_io_gets_internal not to affect $. global variable. * ruby.c (load_file): no longer reset $. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index b533edd2bd..a4a57e260b 100644
--- a/parse.y
+++ b/parse.y
@@ -5680,10 +5680,12 @@ rb_parser_compile_cstr(VALUE vparser, const char *f, const char *s, int len, int
return parser_compile_string(vparser, rb_filesystem_str_new_cstr(f), str, line);
}
+VALUE rb_io_gets_internal(VALUE io);
+
static VALUE
lex_io_gets(struct parser_params *parser, VALUE io)
{
- return rb_io_gets(io);
+ return rb_io_gets_internal(io);
}
NODE*