[前][次][番号順一覧][スレッド一覧]

ruby-changes:10932

From: yugui <ko1@a...>
Date: Sun, 22 Feb 2009 18:47:16 +0900 (JST)
Subject: [ruby-changes:10932] Ruby:r22508 (ruby_1_9_1): gets rid of ^D^D to quit script from stdin.

yugui	2009-02-22 18:47:05 +0900 (Sun, 22 Feb 2009)

  New Revision: 22508

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22508

  Log:
    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.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/ruby.c

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 22507)
+++ ruby_1_9_1/ChangeLog	(revision 22508)
@@ -1,3 +1,7 @@
+Tue Feb  3 23:37:08 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* ruby.c (load_file_internal): resets EOF flag after parse.
+
 Tue Feb  3 14:12:10 2009  Shugo Maeda  <shugo@r...>
 
 	* lib/net/imap.rb: validate data before sending to a server.
Index: ruby_1_9_1/ruby.c
===================================================================
--- ruby_1_9_1/ruby.c	(revision 22507)
+++ ruby_1_9_1/ruby.c	(revision 22508)
@@ -1552,7 +1552,6 @@
 	    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 @@
     else if (f != rb_stdin) {
 	rb_io_close(f);
     }
+    else {
+	rb_io_ungetbyte(f, Qnil);
+    }
     return (VALUE)tree;
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]