ruby-changes:37731
From: nagachika <ko1@a...>
Date: Tue, 3 Mar 2015 02:43:38 +0900 (JST)
Subject: [ruby-changes:37731] nagachika:r49812 (ruby_2_1): merge revision(s) r49797: [Backport #10923]
nagachika 2015-03-03 02:43:19 +0900 (Tue, 03 Mar 2015) New Revision: 49812 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49812 Log: merge revision(s) r49797: [Backport #10923] * ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX Thanks to Yura Sokolov <funny.falcon@g...> [ruby-core:68369] [Bug#10923] * test/io/wait/test_io_wait.rb (test_nread_buffered): fix broken test Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/ext/io/wait/wait.c branches/ruby_2_1/test/io/wait/test_io_wait.rb branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 49811) +++ ruby_2_1/ChangeLog (revision 49812) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Tue Mar 3 02:42:27 2015 Eric Wong <e@8...> + + * ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX + Thanks to Yura Sokolov <funny.falcon@g...> + [ruby-core:68369] [Bug#10923] + * test/io/wait/test_io_wait.rb (test_nread_buffered): + fix broken test + Sun Mar 1 02:30:23 2015 Seiei Higa <hanachin@g...> * vm_method.c (rb_alias): raise a NameError when creating alias to Index: ruby_2_1/ext/io/wait/wait.c =================================================================== --- ruby_2_1/ext/io/wait/wait.c (revision 49811) +++ ruby_2_1/ext/io/wait/wait.c (revision 49812) @@ -62,7 +62,7 @@ io_nread(VALUE io) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/io/wait/wait.c#L62 GetOpenFile(io, fptr); rb_io_check_readable(fptr); len = rb_io_read_pending(fptr); - if (len > 0) return len; + if (len > 0) return INT2FIX(len); if (!FIONREAD_POSSIBLE_P(fptr->fd)) return INT2FIX(0); if (ioctl(fptr->fd, FIONREAD, &n)) return INT2FIX(0); if (n > 0) return ioctl_arg2num(n); Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 49811) +++ ruby_2_1/version.h (revision 49812) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.5" -#define RUBY_RELEASE_DATE "2015-03-01" -#define RUBY_PATCHLEVEL 305 +#define RUBY_RELEASE_DATE "2015-03-03" +#define RUBY_PATCHLEVEL 306 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 3 -#define RUBY_RELEASE_DAY 1 +#define RUBY_RELEASE_DAY 3 #include "ruby/version.h" Index: ruby_2_1/test/io/wait/test_io_wait.rb =================================================================== --- ruby_2_1/test/io/wait/test_io_wait.rb (revision 49811) +++ ruby_2_1/test/io/wait/test_io_wait.rb (revision 49812) @@ -31,7 +31,7 @@ class TestIOWait < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/io/wait/test_io_wait.rb#L31 def test_nread_buffered @w.syswrite ".\n!" - assert_equal ".\n", @r.read(2) + assert_equal ".\n", @r.gets assert_equal 1, @r.nread end Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r49797 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/