Skip to content

Commit

Permalink
Fix Enumerable#take and enable all specs for it
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Sep 20, 2013
1 parent 5968caa commit 2b7d694
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion corelib/enumerable.rb
Expand Up @@ -665,7 +665,9 @@ def sort_by(&block)

alias select find_all

alias take first
def take(num)
first num
end

alias to_a entries

Expand Down
2 changes: 0 additions & 2 deletions spec/filters/bugs/enumerable.rb
Expand Up @@ -30,6 +30,4 @@
fails "Enumerable#group_by gathers whole arrays as elements when each yields multiple"

fails "Enumerable#sort_by returns an Enumerator when a block is not supplied"

fails "Enumerable#take requires an argument"
end

0 comments on commit 2b7d694

Please sign in to comment.