diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-15 01:44:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-15 01:44:57 +0000 |
commit | 5ec029d1ea52224a365a11987379c3e9de74b47a (patch) | |
tree | 6584690b434eb4f1939e18a0e43828652a3a2c57 /test | |
parent | e3c4c7e13bcf5b202701ef5acc86b06187b5fdb7 (diff) | |
download | ruby-5ec029d1ea52224a365a11987379c3e9de74b47a.tar.gz |
array.c: linear performance
* array.c (rb_ary_select_bang, ary_reject_bang): linear
performance. [ruby-core:67418] [Feature #10714]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_array.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 8c08acec7c..75ac28df8f 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -661,7 +661,7 @@ class TestArray < Test::Unit::TestCase bug2545 = '[ruby-core:27366]' a = @cls[ 5, 6, 7, 8, 9, 10 ] - assert_equal(9, a.delete_if {|i| break i if i > 8; assert_equal(a[0], i) || true if i < 7}) + assert_equal(9, a.delete_if {|i| break i if i > 8; i < 7}) assert_equal(@cls[7, 8, 9, 10], a, bug2545) end @@ -1160,7 +1160,7 @@ class TestArray < Test::Unit::TestCase bug2545 = '[ruby-core:27366]' a = @cls[ 5, 6, 7, 8, 9, 10 ] - assert_equal(9, a.reject! {|i| break i if i > 8; assert_equal(a[0], i) || true if i < 7}) + assert_equal(9, a.reject! {|i| break i if i > 8; i < 7}) assert_equal(@cls[7, 8, 9, 10], a, bug2545) end |