summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:42:32 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:42:32 +0000
commit02b4b54a8342772d21fc7a646e2b6d0652da71b9 (patch)
tree3f35e4aacc9111b96b2ccf038d85d8cc58f4715e /struct.c
parent0b0aafce5df8e2da2f69da7bad096d0076f7db03 (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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/struct.c b/struct.c
index 79403a5fb6..92d375d548 100644
--- a/struct.c
+++ b/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]))) {