diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-10-29 09:25:48 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-10-29 09:25:48 +0000 |
commit | 9868574ae43c0fdc49a9d3fc0431bb0613507bfa (patch) | |
tree | 4a0007dc6a1e7e8ae71ad40000b9ba56332dbaf2 /enum.c | |
parent | 419abc80a3b260936a5c1b92690a4885774b29c6 (diff) | |
download | ruby-9868574ae43c0fdc49a9d3fc0431bb0613507bfa.tar.gz ruby-9868574ae43c0fdc49a9d3fc0431bb0613507bfa.tar.xz ruby-9868574ae43c0fdc49a9d3fc0431bb0613507bfa.zip |
19991029
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r-- | enum.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -153,18 +153,6 @@ collect_i(i, tmp) } static VALUE -enum_collect(obj) - VALUE obj; -{ - VALUE tmp; - - tmp = rb_ary_new(); - rb_iterate(rb_each, obj, collect_i, tmp); - - return tmp; -} - -static VALUE enum_all(i, ary) VALUE i, ary; { @@ -185,6 +173,18 @@ enum_to_a(obj) } static VALUE +enum_collect(obj) + VALUE obj; +{ + VALUE tmp; + + tmp = rb_ary_new(); + rb_iterate(rb_each, obj, rb_iterator_p() ? collect_i : enum_all, tmp); + + return tmp; +} + +static VALUE enum_sort(obj) VALUE obj; { |