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
0c3226db
Commit
0c3226db
authored
May 06, 2014
by
ksss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OP_ENTER fix variable assignment
parent
12915f95
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
src/vm.c
src/vm.c
+4
-2
test/t/bs_block.rb
test/t/bs_block.rb
+7
-0
No files found.
src/vm.c
View file @
0c3226db
...
...
@@ -1325,16 +1325,18 @@ RETRY_TRY_BLOCK:
pc
+=
argc
-
m1
-
m2
+
1
;
}
else
{
int
rnum
=
0
;
if
(
argv0
!=
argv
)
{
regs
[
len
+
1
]
=
*
blk
;
/* move block */
value_move
(
&
regs
[
1
],
argv
,
m1
+
o
);
}
if
(
r
)
{
regs
[
m1
+
o
+
1
]
=
mrb_ary_new_from_values
(
mrb
,
argc
-
m1
-
o
-
m2
,
argv
+
m1
+
o
);
rnum
=
argc
-
m1
-
o
-
m2
;
regs
[
m1
+
o
+
1
]
=
mrb_ary_new_from_values
(
mrb
,
rnum
,
argv
+
m1
+
o
);
}
if
(
m2
)
{
if
(
argc
-
m2
>
m1
)
{
value_move
(
&
regs
[
m1
+
o
+
r
+
1
],
&
argv
[
argc
-
m2
],
m2
);
value_move
(
&
regs
[
m1
+
o
+
r
+
1
],
&
argv
[
m1
+
o
+
rnum
],
m2
);
}
}
if
(
argv0
==
argv
)
{
...
...
test/t/bs_block.rb
View file @
0c3226db
...
...
@@ -512,3 +512,10 @@ assert('BS Block 37') do
end
end
assert
(
'BS Block 38'
)
do
def
iter
yield
1
,
2
,
3
,
4
,
5
,
6
end
assert_equal
[
1
,
2
,
3
,
4
,
5
],
iter
{
|
a
,
b
,
c
=
:c
,
d
,
e
|
[
a
,
b
,
c
,
d
,
e
]}
end
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