mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
test/array.rb: call #initialize via #__send__ to skip private check
This commit is contained in:
+4
-4
@@ -195,10 +195,10 @@ assert("Array#index (block)") do
|
||||
end
|
||||
|
||||
assert('Array#initialize', '15.2.12.5.15') do
|
||||
a = [].initialize(1)
|
||||
b = [].initialize(2)
|
||||
c = [].initialize(2, 1)
|
||||
d = [].initialize(2) {|i| i}
|
||||
a = [].__send__(:initialize,1)
|
||||
b = [].__send__(:initialize,2)
|
||||
c = [].__send__(:initialize,2, 1)
|
||||
d = [].__send__(:initialize,2) {|i| i}
|
||||
|
||||
assert_equal([nil], a)
|
||||
assert_equal([nil,nil], b)
|
||||
|
||||
Reference in New Issue
Block a user