summaryrefslogtreecommitdiffhomepage
path: root/mrblib
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-08-13 15:07:10 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-08-25 09:19:17 +0900
commitb3a1d379268b3019b0f45eac8d5f10704ac99fc5 (patch)
treef34259cca296a050815cb5f34c88eafd21a96f52 /mrblib
parent2b2ff844a17f07a80a6b8f22d8963ea050f82344 (diff)
downloadmruby-b3a1d379268b3019b0f45eac8d5f10704ac99fc5.tar.gz
mruby-b3a1d379268b3019b0f45eac8d5f10704ac99fc5.zip
Make `Array.new` to accept both integers and floats.
This time we used `Integral` module which is mruby specific.
Diffstat (limited to 'mrblib')
-rw-r--r--mrblib/array.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrblib/array.rb b/mrblib/array.rb
index 334f4e984..13c5d646c 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? Integer
+ raise TypeError, "expected Integer for 1st argument" unless size.kind_of? Integral
raise ArgumentError, "negative array size" if size < 0
self.clear