diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 09:47:05 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 09:47:05 +0000 |
| commit | 891465dc7608ae9c292af4b2bcea48e2136e92f5 (patch) | |
| tree | dd4651a6f617e4154ab283c192253650e684a85b | |
| parent | 72c36662f25a0b4a8376d17a58761dba99653594 (diff) | |
gets rid of ^D^D to quit script from stdin.
merges r22017 from trunk into ruby_1_9_1.
* ruby.c (load_file_internal): resets EOF flag after parse.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@22508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | ruby.c | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Tue Feb 3 23:37:08 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ruby.c (load_file_internal): resets EOF flag after parse. + Tue Feb 3 14:12:10 2009 Shugo Maeda <shugo@ruby-lang.org> * lib/net/imap.rb: validate data before sending to a server. @@ -1552,7 +1552,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); @@ -1572,6 +1571,9 @@ load_file_internal(VALUE arg) else if (f != rb_stdin) { rb_io_close(f); } + else { + rb_io_ungetbyte(f, Qnil); + } return (VALUE)tree; } |
