From fee9ec61bb9808b5235a78b923a2b8baeebbea8c Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 13 Aug 2018 15:07:10 +0900 Subject: Make `Array.new` to accept both integers and floats. This time we used `Integral` module which is mruby specific. --- mrblib/array.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3