diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-14 10:26:48 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-14 10:26:48 +0000 |
commit | d007e7d20f0b2c76b2c638f9a1a3844a86ddeb62 (patch) | |
tree | bfaddbba21495eed632bd68c715d69f44fc4f549 /enumerator.c | |
parent | e9d69ca0cea5e963022631d5940b3722d4d4eb51 (diff) |
* array.c (rb_ary_count): Override Enumerable#count for better
performance.
(rb_ary_nitems): Undo the backport. Use #count {} instead.
* enumerator.c (enumerator_iter_i): Remove an unused function.
(enumerator_with_index, enumerator_each): Remove unused
variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r-- | enumerator.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/enumerator.c b/enumerator.c index 8ec8b2f60b..d7a79c3c5a 100644 --- a/enumerator.c +++ b/enumerator.c @@ -72,16 +72,6 @@ enumerator_ptr(obj) return ptr; } -static VALUE enumerator_iter_i _((VALUE, VALUE)); -static VALUE -enumerator_iter_i(i, enum_obj) - VALUE i; - VALUE enum_obj; -{ - struct enumerator *e = (struct enumerator *)enum_obj; - return rb_yield(proc_call(e->proc, i)); -} - /* * call-seq: * obj.to_enum(method = :each, *args) @@ -339,7 +329,6 @@ enumerator_each(obj) struct enumerator *e; int argc = 0; VALUE *argv = 0; - VALUE method; if (!rb_block_given_p()) return obj; e = enumerator_ptr(obj); @@ -377,7 +366,6 @@ enumerator_with_index(obj) VALUE memo = 0; int argc = 0; VALUE *argv = 0; - VALUE method; RETURN_ENUMERATOR(obj, 0, 0); if (e->args) { |