aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-18 09:42:36 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-18 09:42:36 +0000
commit4023ffa92f87c497659e737c41da6808df716a50 (patch)
tree84e17cab30a4f553b35aa9d6870412919986c96b /test
parent21cf543d38513a723f1b1f5567dc028b16e56f4f (diff)
downloadruby-4023ffa92f87c497659e737c41da6808df716a50.tar.gz
* array.c (ary_make_shared), test/ruby/test_array.rb (test_permutation): always return the original array when it is shared. [ruby-dev:42067] [Bug #3708]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_array.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index e8edcc25e3..f2d723ffc9 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1549,6 +1549,9 @@ class TestArray < Test::Unit::TestCase
a.permutation {|x| b << x; a.replace(@cls[9, 8, 7, 6]) }
assert_equal(@cls[9, 8, 7, 6], a)
assert_equal(@cls[1, 2, 3, 4].permutation.to_a, b)
+
+ bug3708 = '[ruby-dev:42067]'
+ assert_equal(b, @cls[0, 1, 2, 3, 4][1, 4].permutation.to_a, bug3708)
end
def test_repeated_permutation