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

ruby-changes:12734

From: yugui <ko1@a...>
Date: Sun, 9 Aug 2009 15:04:16 +0900 (JST)
Subject: [ruby-changes:12734] Ruby:r24449 (ruby_1_9_1): merges r24271 from trunk into ruby_1_9_1.

yugui	2009-08-08 19:56:00 +0900 (Sat, 08 Aug 2009)

  New Revision: 24449

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

  Log:
    merges r24271 from trunk into ruby_1_9_1.
    --
    * io.c (argf_eof): should not have reached EOF before trying to
      read.  based on a patch by Heesob Park <phasis AT gmail.com> at
      [ruby-core:24559].  [ruby-core:24557]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/io.c
    branches/ruby_1_9_1/test/ruby/test_argf.rb
    branches/ruby_1_9_1/version.h

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 24448)
+++ ruby_1_9_1/ChangeLog	(revision 24449)
@@ -1,3 +1,9 @@
+Sat Jul 25 17:49:03 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* io.c (argf_eof): should not have reached EOF before trying to
+	  read.  based on a patch by Heesob Park <phasis AT gmail.com> a
+	  [ruby-core:24559].  [ruby-core:24557]
+
 Thu Jul 23 17:31:02 2009  Keiju Ishitsuka  <keiju@r...>
 
 	* lib/irb/ruby-lex.rb: make irb be able to parse
Index: ruby_1_9_1/io.c
===================================================================
--- ruby_1_9_1/io.c	(revision 24448)
+++ ruby_1_9_1/io.c	(revision 24449)
@@ -8041,7 +8041,7 @@
 static VALUE
 argf_eof(VALUE argf)
 {
-    if (ARGF.current_file) {
+    if (RTEST(ARGF.current_file)) {
 	if (ARGF.init_p == 0) return Qtrue;
 	ARGF_FORWARD(0, 0);
 	if (rb_io_eof(ARGF.current_file)) {
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 24448)
+++ ruby_1_9_1/version.h	(revision 24449)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 254
+#define RUBY_PATCHLEVEL 255
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1
Index: ruby_1_9_1/test/ruby/test_argf.rb
===================================================================
--- ruby_1_9_1/test/ruby/test_argf.rb	(revision 24448)
+++ ruby_1_9_1/test/ruby/test_argf.rb	(revision 24449)
@@ -72,7 +72,7 @@
       p [a.gets.chomp, a.lineno, b.gets.chomp, b.lineno] #=> ["5", 5, "5", 8]
       p [a.gets.chomp, a.lineno, b.gets.chomp, b.lineno] #=> ["6", 6, "6", 9]
     SRC
-    expected = src.scan(/\#=> *(.*+)/).flatten
+    expected = src.scan(/\#=> *(.+)/).flatten
     ruby('-e', src, @t1.path, @t2.path, @t3.path) do |f|
       f.each_with_index do |a, i|
         assert_equal(expected.shift, a.chomp, "[ruby-dev:34445]: line #{i}")
@@ -102,7 +102,7 @@
       a.gets; p $.  #=> 2001
       a.gets; p $.  #=> 2001
     SRC
-    expected = src.scan(/\#=> *(.*+)/).join(",")
+    expected = src.scan(/\#=> *(.+)/).join(",")
     ruby('-e', src, @t1.path, @t2.path, @t3.path) do |f|
       assert_equal(expected, f.read.chomp.gsub("\n", ","))
     end
@@ -125,7 +125,7 @@
       a.gets; p $.  #=> 2000
       a.gets; p $.  #=> 2000
     SRC
-    expected = src.scan(/\#=> *(.*+)/).join(",")
+    expected = src.scan(/\#=> *(.+)/).join(",")
     ruby('-e', src, @t1.path, @t2.path, @t3.path) do |f|
       assert_equal(expected, f.read.chomp.gsub("\n", ","))
     end
@@ -433,7 +433,7 @@
       end
     SRC
       a = f.read.split("\n")
-      ((%w(true false) * 4).take(7) + %w(end)).each do |x|
+      (%w(false) + (%w(false true) * 3) + %w(end)).each do |x|
         assert_equal(x, a.shift)
       end
     end

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

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