diff options
| author | okkez <[email protected]> | 2017-03-29 07:59:28 +0900 |
|---|---|---|
| committer | okkez <[email protected]> | 2017-03-29 08:02:21 +0900 |
| commit | 6dbe2272cf4e1d8262894e03018f3e1b7b763dc4 (patch) | |
| tree | 8fa8cbfb76e8f546375373ba2eac5d577586822e /test/t/array.rb | |
| parent | 5ec051fc34a380687cbca463228131b013aa8db2 (diff) | |
| download | mruby-6dbe2272cf4e1d8262894e03018f3e1b7b763dc4.tar.gz mruby-6dbe2272cf4e1d8262894e03018f3e1b7b763dc4.zip | |
Set proper class to subclass of Array
More compatibility to CRuby.
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 |
