-
Notifications
You must be signed in to change notification settings - Fork 784
-
Notifications
You must be signed in to change notification settings - Fork 784
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
Top level local variable is not file scope with mruby
command
#4931
Comments
dearblue
added a commit
to dearblue/mruby
that referenced
this issue
Jan 19, 2020
Ref mruby#4931 With this change, the `_` variable is defined after the `-r` switch.
dearblue
added a commit
to dearblue/mruby
that referenced
this issue
Jan 29, 2020
I tried to fix it as #4933, but @shuujii pointed out a new problem. Based on that, I discovered and commented on a problem that occurred in mruby binary and will leave it here too. # c.rb
a, b, c = 1, 2, 3
A = -> { b = -2; [a, b, c] } # d.rb
a, b = 5, 6
p A.call
p a, b % bin/mrbc c.rb
% bin/mrbc d.rb
% bin/mruby -b -r c.rb d.rb
[5, -2, main]
5
-2 This result can also be confirmed at https://travis-ci.com/dearblue/mruby/jobs/281490648#L1473. |
dearblue
added a commit
to dearblue/mruby
that referenced
this issue
Jan 29, 2020
dearblue
added a commit
to dearblue/mruby
that referenced
this issue
Jan 29, 2020
dearblue
added a commit
to dearblue/mruby
that referenced
this issue
Jan 29, 2020
dearblue
added a commit
to dearblue/mruby
that referenced
this issue
Jan 29, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is the following behavior intentional?
Files
mruby
Ruby
The text was updated successfully, but these errors were encountered: