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

ruby-changes:42278

From: naruse <ko1@a...>
Date: Tue, 29 Mar 2016 13:56:12 +0900 (JST)
Subject: [ruby-changes:42278] naruse:r54352 (ruby_2_3): merge revision(s) 53329: [Backport #11885]

naruse	2016-03-29 13:56:07 +0900 (Tue, 29 Mar 2016)

  New Revision: 54352

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54352

  Log:
    merge revision(s) 53329: [Backport #11885]
    
    * io.c (io_getpartial): remove unused kwarg from template
    
    * test/ruby/test_io.rb (test_readpartial_bad_args): new
      [Bug #11885]

  Modified directories:
    branches/ruby_2_3/
  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/io.c
    branches/ruby_2_3/test/ruby/test_io.rb
    branches/ruby_2_3/version.h
Index: ruby_2_3/io.c
===================================================================
--- ruby_2_3/io.c	(revision 54351)
+++ ruby_2_3/io.c	(revision 54352)
@@ -2506,7 +2506,7 @@ io_getpartial(int argc, VALUE *argv, VAL https://github.com/ruby/ruby/blob/trunk/ruby_2_3/io.c#L2506
     long n, len;
     struct read_internal_arg arg;
 
-    rb_scan_args(argc, argv, "11:", &length, &str, NULL);
+    rb_scan_args(argc, argv, "11", &length, &str);
 
     if ((len = NUM2LONG(length)) < 0) {
 	rb_raise(rb_eArgError, "negative length %ld given", len);
Index: ruby_2_3/ChangeLog
===================================================================
--- ruby_2_3/ChangeLog	(revision 54351)
+++ ruby_2_3/ChangeLog	(revision 54352)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1
+Tue Mar 29 13:50:30 2016  Eric Wong  <e@8...>
+
+	* io.c (io_getpartial): remove unused kwarg from template
+	* test/ruby/test_io.rb (test_readpartial_bad_args): new
+	  [Bug #11885]
+
 Tue Mar 29 13:41:03 2016  Tadashi Saito  <tadashi_saito@d...>
 
 	* compile.c, cont.c, doc, man: fix common misspelling.
Index: ruby_2_3/test/ruby/test_io.rb
===================================================================
--- ruby_2_3/test/ruby/test_io.rb	(revision 54351)
+++ ruby_2_3/test/ruby/test_io.rb	(revision 54352)
@@ -3186,6 +3186,17 @@ End https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/ruby/test_io.rb#L3186
     }
   end
 
+  def test_readpartial_bad_args
+    IO.pipe do |r, w|
+      w.write '.'
+      buf = String.new
+      assert_raise(ArgumentError) { r.readpartial(1, buf, exception: false) }
+      assert_raise(TypeError) { r.readpartial(1, exception: false) }
+      assert_equal [[r],[],[]], IO.select([r], nil, nil, 1)
+      assert_equal '.', r.readpartial(1)
+    end
+  end
+
   def test_sysread_unlocktmp_ensure
     bug8669 = '[ruby-core:56121] [Bug #8669]'
 
Index: ruby_2_3/version.h
===================================================================
--- ruby_2_3/version.h	(revision 54351)
+++ ruby_2_3/version.h	(revision 54352)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1
 #define RUBY_VERSION "2.3.0"
 #define RUBY_RELEASE_DATE "2016-03-29"
-#define RUBY_PATCHLEVEL 10
+#define RUBY_PATCHLEVEL 11
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3

Property changes on: ruby_2_3
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r53329


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

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