summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-20 03:09:13 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-20 03:09:13 +0000
commit13834fb3cb8c89c647f1f05439e940d45c46fb69 (patch)
tree6d272ea2ef9d6047adccbe895fbe857cf896e68d /test/ruby
parent2653f2385895b5ce904d439a992faaf4ffe5d763 (diff)
* hash.c (rb_hash_flatten): fix behavior of flatten(0).
[ruby-dev:47988] [Bug #9533] * test/ruby/test_array.rb: test for above. patch is from Takeshi Sasaki. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 e2cafb620c..c0745dd166 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -974,7 +974,7 @@ 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(0))
+ 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))