diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-03 14:37:09 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-03 14:37:09 +0000 |
| commit | f649bd1c487323896b0e72cb428e8e4b156a5cf8 (patch) | |
| tree | 67160be69c04aa16513365916087a50e11c435d2 /ruby.c | |
| parent | c98eea85969b5308a49480e2af68782da637a429 (diff) | |
| download | ruby-f649bd1c487323896b0e72cb428e8e4b156a5cf8.tar.gz ruby-f649bd1c487323896b0e72cb428e8e4b156a5cf8.tar.xz ruby-f649bd1c487323896b0e72cb428e8e4b156a5cf8.zip | |
* ruby.c (load_file_internal): resets EOF flag after parse.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
| -rw-r--r-- | ruby.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1581,7 +1581,6 @@ load_file_internal(VALUE arg) rb_io_ungetbyte(f, c); } require_libraries(opt); /* Why here? unnatural */ - rb_io_ungetbyte(f, Qnil); } if (opt->src.enc.index >= 0) { enc = rb_enc_from_index(opt->src.enc.index); @@ -1601,6 +1600,9 @@ load_file_internal(VALUE arg) else if (f != rb_stdin) { rb_io_close(f); } + else { + rb_io_ungetbyte(f, Qnil); + } return (VALUE)tree; } |
