Skip to content
Permalink
Browse files

Merge pull request #658 from kostya/hash_flatten

Hash flatten
  • Loading branch information
alex committed Apr 24, 2013
2 parents f57cc6b + 206e876 commit 616a30be0b079aa59cf013706a4ad22b4590fe92
@@ -211,4 +211,11 @@ def reject(&block)
return enum_for(:reject) unless block
dup.delete_if(&block)
end

def flatten(level = 1)
level = Topaz.convert_type(level, Fixnum, :to_int)
out = []
Topaz::Array.flatten(self, out, level)
out
end
end

This file was deleted.

@@ -12,10 +12,6 @@ fails:A block taking |a, | arguments assigns the argument the first element of t
fails:A block taking |a, | arguments calls #to_ary to convert a single yielded object to an Array
fails:A block taking |a, | arguments does not call #to_ary if the single yielded object is an Array
fails:A block taking |a, | arguments raises an TypeError if #to_ary does not return an Array
fails:A block taking |(a, b)| arguments destructures a single Array value yielded
fails:A block taking |(a, b)| arguments calls #to_ary to convert a single yielded object to an Array
fails:A block taking |(a, b)| arguments does not call #to_ary if the single yielded object is an Array
fails:A block taking |(a, b)| arguments does not call #to_ary if the object does not respond to #to_ary
fails:A block taking |(a, b)| arguments raises an TypeError if #to_ary does not return an Array
fails:A block taking |(a, b), c| arguments calls #to_ary to convert a single yielded object to an Array
fails:A block taking |(a, b), c| arguments raises an TypeError if #to_ary does not return an Array
@@ -8,6 +8,4 @@ fails:A Proc taking |a, *b| arguments raises an ArgumentError if passed no value
fails:A Proc taking |a, | arguments raises an ArgumentError when passed no values
fails:A Proc taking |a, | arguments raises an ArgumentError when passed more than one value
fails:A Proc taking |(a, b)| arguments raises an ArgumentError when passed no values
fails:A Proc taking |(a, b)| arguments destructures a single Array value yielded
fails:A Proc taking |(a, b)| arguments calls #to_ary to convert a single passed object to an Array
fails:A Proc taking |(a, b)| arguments raises an TypeError if #to_ary does not return an Array

0 comments on commit 616a30b

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