mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
merges r25243 from trunk into ruby_1_9_1.
-- * struct.c (rb_struct_select): Struct#select should return enumerator when no block given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0b0aafce5d
commit
02b4b54a83
3 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Oct 6 18:56:09 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* struct.c (rb_struct_select): Struct#select should return
|
||||
enumerator when no block given.
|
||||
|
||||
Sun Jan 10 17:25:24 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/webrick/accesslog.rb : Escape needed.
|
||||
|
|
1
struct.c
1
struct.c
|
@ -750,6 +750,7 @@ rb_struct_select(int argc, VALUE *argv, VALUE s)
|
|||
if (argc > 0) {
|
||||
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
|
||||
}
|
||||
RETURN_ENUMERATOR(s, 0, 0);
|
||||
result = rb_ary_new();
|
||||
for (i = 0; i < RSTRUCT_LEN(s); i++) {
|
||||
if (RTEST(rb_yield(RSTRUCT_PTR(s)[i]))) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#define RUBY_VERSION "1.9.1"
|
||||
#define RUBY_PATCHLEVEL 378
|
||||
#define RUBY_PATCHLEVEL 379
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 9
|
||||
#define RUBY_VERSION_TEENY 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue