diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-03-29 09:40:44 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-03-29 09:40:44 +0900 |
| commit | 506c05f01df8ee84f0da1840d351219b29342d17 (patch) | |
| tree | 8fa8cbfb76e8f546375373ba2eac5d577586822e /test/t/array.rb | |
| parent | 5ec051fc34a380687cbca463228131b013aa8db2 (diff) | |
| parent | 6dbe2272cf4e1d8262894e03018f3e1b7b763dc4 (diff) | |
| download | mruby-506c05f01df8ee84f0da1840d351219b29342d17.tar.gz mruby-506c05f01df8ee84f0da1840d351219b29342d17.zip | |
Merge pull request #3564 from okkez/set-proper-class-to-subclass-of-array
Set proper class to subclass of Array
Diffstat (limited to 'test/t/array.rb')
| -rw-r--r-- | test/t/array.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/t/array.rb b/test/t/array.rb index cf7ed4704..4efc5166a 100644 --- a/test/t/array.rb +++ b/test/t/array.rb @@ -13,6 +13,14 @@ assert('Array.[]', '15.2.12.4.1') do assert_equal([1, 2, 3], Array.[](1,2,3)) end +class SubArray < Array +end + +assert('SubArray.[]') do + a = SubArray[1, 2, 3] + assert_equal(SubArray, a.class) +end + assert('Array#+', '15.2.12.5.1') do assert_equal([1, 1], [1].+([1])) end |
