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
b4a35344
Commit
b4a35344
authored
Sep 19, 2018
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Removed `to_ary` conversion method.
parent
16e8f878
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
include/mruby/array.h
include/mruby/array.h
+1
-1
src/array.c
src/array.c
+1
-1
src/object.c
src/object.c
+1
-1
No files found.
include/mruby/array.h
View file @
b4a35344
...
...
@@ -199,7 +199,7 @@ MRB_API void mrb_ary_set(mrb_state *mrb, mrb_value ary, mrb_int n, mrb_value val
* @param other The array to replace it with.
*/
MRB_API
void
mrb_ary_replace
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_value
other
);
MRB_API
mrb_value
mrb_array_type
(
mrb_state
*
mrb
,
mrb_value
self
);
MRB_API
mrb_value
mrb_
ensure_
array_type
(
mrb_state
*
mrb
,
mrb_value
self
);
MRB_API
mrb_value
mrb_check_array_type
(
mrb_state
*
mrb
,
mrb_value
self
);
/*
...
...
src/array.c
View file @
b4a35344
...
...
@@ -1072,7 +1072,7 @@ mrb_ary_splat(mrb_state *mrb, mrb_value v)
if
(
mrb_nil_p
(
a
))
{
return
mrb_ary_new_from_values
(
mrb
,
1
,
&
v
);
}
mrb_array_type
(
mrb
,
a
);
mrb_
ensure_
array_type
(
mrb
,
a
);
return
a
;
}
...
...
src/object.c
View file @
b4a35344
...
...
@@ -607,7 +607,7 @@ mrb_check_string_type(mrb_state *mrb, mrb_value str)
}
MRB_API
mrb_value
mrb_array_type
(
mrb_state
*
mrb
,
mrb_value
ary
)
mrb_
ensure_
array_type
(
mrb_state
*
mrb
,
mrb_value
ary
)
{
if
(
!
mrb_array_p
(
ary
))
{
mrb_raisef
(
mrb
,
E_TYPE_ERROR
,
"%S cannot be converted to Array"
,
...
...
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