Skip to content

Commit

Permalink
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 0 additions & 6 deletions spec/truffle/tags/core/array/select_tags.txt

This file was deleted.

9 changes: 9 additions & 0 deletions truffle/src/main/ruby/core/rubinius/common/array.rb
Original file line number Diff line number Diff line change
@@ -926,6 +926,15 @@ def sample(count=undefined, options=undefined)
return count == size ? result : result[0, count]
end

def select!(&block)
return to_enum :select! unless block_given?

Rubinius.check_frozen

ary = select(&block)
replace ary unless size == ary.size
end

def find_index(obj=undefined)
super
end

0 comments on commit b696c67

Please sign in to comment.