mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* struct.c (rb_struct_select): fix typo.
* io.c (io_write): check error if written data is less than specified size to detect EPIPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
29b36962fe
commit
cd948e4600
3 changed files with 12 additions and 3 deletions
2
struct.c
2
struct.c
|
@ -540,7 +540,7 @@ rb_struct_select(argc, argv, s)
|
|||
rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc);
|
||||
}
|
||||
for (i = 0; i < RSTRUCT(s)->len; i++) {
|
||||
if (RTEST(rb_yield(RARRAY(s)->ptr[i]))) {
|
||||
if (RTEST(rb_yield(RSTRUCT(s)->ptr[i]))) {
|
||||
rb_ary_push(result, RSTRUCT(s)->ptr[i]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue