Skip to content

Commit

Permalink
Add a more efficient Array::Seq#to_a.
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Olson committed Apr 22, 2013
1 parent c1fcd85 commit 3e4e028
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/apricot/ruby_ext.rb
Expand Up @@ -71,6 +71,10 @@ def each
def count
@array.length - @offset
end

def to_a
@array[@offset..-1]
end
end
end

Expand Down

0 comments on commit 3e4e028

Please sign in to comment.