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
6b34166b
Commit
6b34166b
authored
Sep 19, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const_defined? to check superclasses; ref #2593
parent
50f54529
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
src/variable.c
src/variable.c
+6
-10
No files found.
src/variable.c
View file @
6b34166b
...
...
@@ -854,16 +854,6 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
mrb_mod_cv_set
(
mrb
,
c
,
sym
,
v
);
}
MRB_API
mrb_bool
mrb_const_defined
(
mrb_state
*
mrb
,
mrb_value
mod
,
mrb_sym
sym
)
{
struct
RClass
*
m
=
mrb_class_ptr
(
mod
);
iv_tbl
*
t
=
m
->
iv
;
if
(
!
t
)
return
FALSE
;
return
iv_get
(
mrb
,
t
,
sym
,
NULL
);
}
static
void
mod_const_check
(
mrb_state
*
mrb
,
mrb_value
mod
)
{
...
...
@@ -1113,6 +1103,12 @@ retry:
return
FALSE
;
}
MRB_API
mrb_bool
mrb_const_defined
(
mrb_state
*
mrb
,
mrb_value
mod
,
mrb_sym
id
)
{
return
mrb_const_defined_0
(
mrb
,
mrb_class_ptr
(
mod
),
id
,
TRUE
,
TRUE
);
}
MRB_API
mrb_bool
mrb_const_defined_at
(
mrb_state
*
mrb
,
struct
RClass
*
klass
,
mrb_sym
id
)
{
...
...
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