Skip to content
Permalink
Browse files

Merge pull request #723 from kostya/values_at

fix Array#values_at
  • Loading branch information
alex committed May 21, 2013
2 parents 7d11c29 + 58e8941 commit c5aa42c47e0a74b9ea4f28fcaabb8dcfa4deb613
Showing with 10 additions and 3 deletions.
  1. +10 −1 lib-topaz/array.rb
  2. +0 −2 spec/tags/core/array/values_at_tags.txt
@@ -296,7 +296,16 @@ def uniq(&block)
end

def values_at(*args)
args.map { |n| self[n] }
out = []
args.each do |arg|
if arg.is_a?(Range)
v = self[arg]
out.concat(v) if v
else
out << self[arg]
end
end
out
end

def each_index(&block)

This file was deleted.

0 comments on commit c5aa42c

Please sign in to comment.
You can’t perform that action at this time.