-
Notifications
You must be signed in to change notification settings - Fork 807
local_variables is broken #3710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The first issue is mruby limitation. We will try to address it but it would take time. |
matz
added a commit
that referenced
this issue
Jun 19, 2017
Actually I found the first issue when debugging the second one, so I'm not stacked at that if I know that's a limitation. Thanks a lot! |
Oops, issue number was wrong. |
Closed
tsahara
pushed a commit
to iij/mruby
that referenced
this issue
Jun 11, 2018
dearblue
added a commit
to dearblue/mruby
that referenced
this issue
May 31, 2020
matz
added a commit
that referenced
this issue
Jun 1, 2020
Get local variable names from orphan block; ref #3710
matz
pushed a commit
that referenced
this issue
Jun 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
outputs
[:hoge]
, but I expect[:hoge, :var]
as CRuby does.As I looked the code,
struct REnv *
assigned to the generated proc gets unshared when cipop called in OP_RETURN, and that makes the env not enumarated. Is this a mruby's spec or not?Even if that's a spec, I believe that the following behavior is absolutely a bug.
says
[:hoge, :invisible]
, but if I'm correctinvisible
shouldn't appear.In this case, the env of the generated proc is not unshared due to another callinfo, but mrb_local_variables refers current callinfo stack, so variables not related to the proc appears. As a similar example,
outputs the same,
[:hoge, :invisible]
. In this case, another context's callinfo which gets overwrited by callingdummy
function is referred.The text was updated successfully, but these errors were encountered: