mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
optimized any? methods
* array.c (rb_ary_any_p), hash.c (rb_hash_any_p): optimized versions. these are bit faster than optimization in Enumerable#any?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e23d173679
commit
d738e3e155
3 changed files with 74 additions and 4 deletions
|
@ -285,11 +285,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
|||
|
||||
[["c-return", 1, :set_trace_func, Kernel],
|
||||
["line", 4, __method__, self.class],
|
||||
["c-call", 4, :any?, Enumerable],
|
||||
["c-call", 4, :each, Array],
|
||||
["c-call", 4, :any?, Array],
|
||||
["line", 4, __method__, self.class],
|
||||
["c-return", 4, :each, Array],
|
||||
["c-return", 4, :any?, Enumerable],
|
||||
["c-return", 4, :any?, Array],
|
||||
["line", 5, __method__, self.class],
|
||||
["c-call", 5, :set_trace_func, Kernel]].each{|e|
|
||||
assert_equal(e, events.shift)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue