ruby-changes:38195
From: nagachika <ko1@a...>
Date: Mon, 13 Apr 2015 00:46:49 +0900 (JST)
Subject: [ruby-changes:38195] nagachika:r50276 (ruby_2_2): merge revision(s) 49797: [Backport #10923]
nagachika 2015-04-13 00:46:26 +0900 (Mon, 13 Apr 2015) New Revision: 50276 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50276 Log: merge revision(s) 49797: [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_2/ Modified files: branches/ruby_2_2/ChangeLog branches/ruby_2_2/ext/io/wait/wait.c branches/ruby_2_2/test/io/wait/test_io_wait.rb branches/ruby_2_2/version.h Index: ruby_2_2/ChangeLog =================================================================== --- ruby_2_2/ChangeLog (revision 50275) +++ ruby_2_2/ChangeLog (revision 50276) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1 +Mon Apr 13 00:44:12 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 + Mon Apr 13 00:16:32 2015 Nobuyoshi Nakada <nobu@r...> * vm_eval.c (vm_call_super): search next super class from the Index: ruby_2_2/ext/io/wait/wait.c =================================================================== --- ruby_2_2/ext/io/wait/wait.c (revision 50275) +++ ruby_2_2/ext/io/wait/wait.c (revision 50276) @@ -62,7 +62,7 @@ io_nread(VALUE io) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/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_2/version.h =================================================================== --- ruby_2_2/version.h (revision 50275) +++ ruby_2_2/version.h (revision 50276) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #define RUBY_VERSION "2.2.2" #define RUBY_RELEASE_DATE "2015-04-13" -#define RUBY_PATCHLEVEL 91 +#define RUBY_PATCHLEVEL 92 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 4 Index: ruby_2_2/test/io/wait/test_io_wait.rb =================================================================== --- ruby_2_2/test/io/wait/test_io_wait.rb (revision 50275) +++ ruby_2_2/test/io/wait/test_io_wait.rb (revision 50276) @@ -31,7 +31,7 @@ class TestIOWait < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_2/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_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r49797 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/