Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
b3a1d379
Commit
b3a1d379
authored
Aug 13, 2018
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make `Array.new` to accept both integers and floats.
This time we used `Integral` module which is mruby specific.
parent
2b2ff844
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mrblib/array.rb
mrblib/array.rb
+1
-1
No files found.
mrblib/array.rb
View file @
b3a1d379
...
...
@@ -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?
Integ
er
raise
TypeError
,
"expected Integer for 1st argument"
unless
size
.
kind_of?
Integ
ral
raise
ArgumentError
,
"negative array size"
if
size
<
0
self
.
clear
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment