diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-30 12:42:32 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-30 12:42:32 +0000 |
commit | 02b4b54a8342772d21fc7a646e2b6d0652da71b9 (patch) | |
tree | 3f35e4aacc9111b96b2ccf038d85d8cc58f4715e /struct.c | |
parent | 0b0aafce5df8e2da2f69da7bad096d0076f7db03 (diff) |
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
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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]))) { |