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
aa1f668b
Commit
aa1f668b
authored
Jan 02, 2016
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
instance_eval should pass the receiver as a block parameter; close #3029
parent
879e27d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/vm.c
src/vm.c
+3
-1
No files found.
src/vm.c
View file @
aa1f668b
...
@@ -510,11 +510,13 @@ eval_under(mrb_state *mrb, mrb_value self, mrb_value blk, struct RClass *c)
...
@@ -510,11 +510,13 @@ eval_under(mrb_state *mrb, mrb_value self, mrb_value blk, struct RClass *c)
}
}
ci
=
mrb
->
c
->
ci
;
ci
=
mrb
->
c
->
ci
;
if
(
ci
->
acc
==
CI_ACC_DIRECT
)
{
if
(
ci
->
acc
==
CI_ACC_DIRECT
)
{
return
mrb_yield_with_class
(
mrb
,
blk
,
0
,
0
,
self
,
c
);
return
mrb_yield_with_class
(
mrb
,
blk
,
1
,
&
self
,
self
,
c
);
}
}
ci
->
target_class
=
c
;
ci
->
target_class
=
c
;
p
=
mrb_proc_ptr
(
blk
);
p
=
mrb_proc_ptr
(
blk
);
ci
->
proc
=
p
;
ci
->
proc
=
p
;
ci
->
argc
=
1
;
mrb
->
c
->
stack
[
1
]
=
self
;
if
(
MRB_PROC_CFUNC_P
(
p
))
{
if
(
MRB_PROC_CFUNC_P
(
p
))
{
return
p
->
body
.
func
(
mrb
,
self
);
return
p
->
body
.
func
(
mrb
,
self
);
}
}
...
...
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