summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-20 02:27:30 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-20 02:27:30 +0000
commitf138018e9efc6fb962e591ebe96880d0da8a2236 (patch)
treeb56609dcd0db17e9f0f44d49b142e1f8e56a76e5 /test
parent2e6b97a45d077979121b29484a8831034d47ef50 (diff)
* hash.c (rb_hash_flatten): fix behavior of flatten(-1).
[ruby-dev:47988] [Bug #9533] * test/ruby/test_array.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_hash.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index c39cd23d54..e2cafb620c 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -974,11 +974,11 @@ class TestHash < Test::Unit::TestCase
a = @cls[1=> "one", 2 => [2,"two"], 3 => [3, ["three"]]]
assert_equal([1, "one", 2, [2, "two"], 3, [3, ["three"]]], a.flatten)
- assert_equal([1, "one", 2, [2, "two"], 3, [3, ["three"]]], a.flatten(-1))
assert_equal([1, "one", 2, [2, "two"], 3, [3, ["three"]]], a.flatten(0))
assert_equal([1, "one", 2, [2, "two"], 3, [3, ["three"]]], a.flatten(1))
assert_equal([1, "one", 2, 2, "two", 3, 3, ["three"]], a.flatten(2))
assert_equal([1, "one", 2, 2, "two", 3, 3, "three"], a.flatten(3))
+ assert_equal([1, "one", 2, 2, "two", 3, 3, "three"], a.flatten(-1))
assert_raise(TypeError){ a.flatten(Object) }
end