summaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-21 12:42:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-21 12:42:39 +0000
commit9d7c3b07eccb295cbffcd029e3ca57168ecb89c3 (patch)
tree75e038b369479f4ff91e677febe7ac495f8a33e5 /ruby.c
parent3e3b1263946311ba6784179da6542a185312a118 (diff)
downloadruby-9d7c3b07eccb295cbffcd029e3ca57168ecb89c3.tar.gz
ruby-9d7c3b07eccb295cbffcd029e3ca57168ecb89c3.tar.xz
ruby-9d7c3b07eccb295cbffcd029e3ca57168ecb89c3.zip
* io.c (rb_io_ungetbyte, rb_io_ungetc): allows nil to reset EOF
flag with ungetting nothing. * ruby.c (load_file_internal): rests EOF flag to make possible to load from stdin after reading data. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 9bf79bdfb..e43fc2c9e 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1581,6 +1581,7 @@ 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);