diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-31 09:57:45 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-31 09:57:45 +0000 |
| commit | 7a07099539b04e509b55572e8308320b11844ea7 (patch) | |
| tree | 9dc2212f5f82c2829406910977904e3b48163908 | |
| parent | a34130eb7c4ecc164115a59aa1b76c643bd98202 (diff) | |
| download | ruby-7a07099539b04e509b55572e8308320b11844ea7.tar.gz ruby-7a07099539b04e509b55572e8308320b11844ea7.tar.xz ruby-7a07099539b04e509b55572e8308320b11844ea7.zip | |
* test/ruby/test_array.rb (test_array_subclass) test for r20076.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | test/ruby/test_array.rb | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,6 +1,10 @@ +Fri Oct 31 18:51:42 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp> + + * test/ruby/test_array.rb (test_array_subclass): test for r20076. + Fri Oct 31 18:42:19 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp> - * array.c (ary_partial0): recovers mistakenly feature change at r19723. + * array.c (ary_partial0): recovers the mistakenly changed feature at r19723. Array#[m,n] had returned an Array even for an instance of a subclass. diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 820166a0a..9edd31dfa 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1622,6 +1622,8 @@ class TestArray < Test::Unit::TestCase def test_array_subclass assert_equal(Array2, Array2[1,2,3].uniq.class, "[ruby-dev:34581]") + assert_equal(Array2, Array2[1,2][0,1].class) # embeded + assert_equal(Array2, Array2[*(1..100)][1..99].class) #not embeded end def test_inspect |
