mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) r49797: [Backport #10923]
* ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX Thanks to Yura Sokolov <funny.falcon@gmail.com> [ruby-core:68369] [Bug#10923] * test/io/wait/test_io_wait.rb (test_nread_buffered): fix broken test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f50f70259d
commit
3457be5f12
4 changed files with 13 additions and 5 deletions
|
|
@ -1,3 +1,11 @@
|
|||
Tue Mar 3 02:42:27 2015 Eric Wong <e@80x24.org>
|
||||
|
||||
* ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX
|
||||
Thanks to Yura Sokolov <funny.falcon@gmail.com>
|
||||
[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@gmail.com>
|
||||
|
||||
* vm_method.c (rb_alias): raise a NameError when creating alias to
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ io_nread(VALUE io)
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class TestIOWait < Test::Unit::TestCase
|
|||
|
||||
def test_nread_buffered
|
||||
@w.syswrite ".\n!"
|
||||
assert_equal ".\n", @r.read(2)
|
||||
assert_equal ".\n", @r.gets
|
||||
assert_equal 1, @r.nread
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue