diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-24 08:21:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-24 08:21:04 +0000 |
commit | d4819da61111c508a3d582b7cf9957cc896fea14 (patch) | |
tree | b86fe742635cbb45f735cc8380ea1ff86797b4e5 /parse.y | |
parent | 43f7eacdac9d0f719d3d164ffa2f2385f49e3c28 (diff) | |
download | ruby-d4819da61111c508a3d582b7cf9957cc896fea14.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.y | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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* |