summaryrefslogtreecommitdiffhomepage
path: root/mrblib/array.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-09-20 10:13:36 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-09-20 10:13:36 +0900
commit8e91316bd64aa39b3afeffb0ade5eb38b05d3953 (patch)
treefabce96f895417c6d2252860211aeb7b4df97a31 /mrblib/array.rb
parent3820ef791f3ccb766956d12534ae519f4923ac7e (diff)
parentcb85fa6787ea9467f81be41570a36b475b7ef061 (diff)
downloadmruby-8e91316bd64aa39b3afeffb0ade5eb38b05d3953.tar.gz
mruby-8e91316bd64aa39b3afeffb0ade5eb38b05d3953.zip
Merge branch 'no-implicit-conversion' into mruby2-draftmruby2-draft
Diffstat (limited to 'mrblib/array.rb')
-rw-r--r--mrblib/array.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrblib/array.rb b/mrblib/array.rb
index 13c5d646c..16c602ba0 100644
--- a/mrblib/array.rb
+++ b/mrblib/array.rb
@@ -66,7 +66,7 @@ class Array
#
# ISO 15.2.12.5.15
def initialize(size=0, obj=nil, &block)
- raise TypeError, "expected Integer for 1st argument" unless size.kind_of? Integral
+ size = size.__to_int
raise ArgumentError, "negative array size" if size < 0
self.clear