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
7830b841
Commit
7830b841
authored
7 years ago
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed uninitialized local variable bug; ref #3692
parent
b32ad130
master
mruby2-draft
removing-y-tab-c
revert-5391-throw
stable
3.1.0-rc
3.0.0
3.0.0-rc
3.0.0-preview
2.1.2
2.1.2-rc2
2.1.2-rc
2.1.1
2.1.1-rc2
2.1.1-rc
2.1.0
2.1.0-rc
2.0.1
2.0.0
1.4.1
1.4.0
1.3.0
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
src/vm.c
src/vm.c
+9
-11
No files found.
src/vm.c
View file @
7830b841
...
...
@@ -1241,7 +1241,7 @@ RETRY_TRY_BLOCK:
int
n
=
GETARG_C
(
i
);
struct
RProc
*
m
;
struct
RClass
*
c
;
mrb_callinfo
*
ci
;
mrb_callinfo
*
ci
=
mrb
->
c
->
ci
;
mrb_value
recv
,
result
;
mrb_sym
mid
=
syms
[
GETARG_B
(
i
)];
int
bidx
;
...
...
@@ -1255,19 +1255,19 @@ RETRY_TRY_BLOCK:
bidx
=
a
+
n
+
1
;
}
if
(
GET_OPCODE
(
i
)
!=
OP_SENDB
)
{
if
(
bidx
>=
mrb
->
c
->
ci
->
nregs
)
{
if
(
bidx
>=
ci
->
nregs
)
{
stack_extend
(
mrb
,
bidx
+
1
);
mrb
->
c
->
ci
->
nregs
=
bidx
+
1
;
ci
->
nregs
=
bidx
+
1
;
}
SET_NIL_VALUE
(
regs
[
bidx
]);
SET_NIL_VALUE
(
blk
);
blk
=
mrb_nil_value
(
);
}
else
{
mrb_value
blk
=
regs
[
bidx
];
blk
=
regs
[
bidx
];
if
(
!
mrb_nil_p
(
blk
)
&&
mrb_type
(
blk
)
!=
MRB_TT_PROC
)
{
if
(
bidx
>=
mrb
->
c
->
ci
->
nregs
)
{
if
(
bidx
>=
ci
->
nregs
)
{
stack_extend
(
mrb
,
bidx
+
1
);
mrb
->
c
->
ci
->
nregs
=
bidx
+
1
;
ci
->
nregs
=
bidx
+
1
;
}
result
=
mrb_convert_type
(
mrb
,
blk
,
MRB_TT_PROC
,
"Proc"
,
"to_proc"
);
blk
=
regs
[
bidx
]
=
result
;
...
...
@@ -1294,10 +1294,8 @@ RETRY_TRY_BLOCK:
}
mid
=
missing
;
if
(
n
!=
CALL_MAXARGS
)
{
mrb_value
blk
=
regs
[
bidx
];
if
(
a
+
2
>
irep
->
nregs
)
{
stack_extend
(
mrb
,
a
+
2
);
if
(
a
+
2
>=
irep
->
nregs
)
{
stack_extend
(
mrb
,
a
+
3
);
}
regs
[
a
+
1
]
=
mrb_ary_new_from_values
(
mrb
,
n
,
regs
+
a
+
1
);
regs
[
a
+
2
]
=
blk
;
...
...
This diff is collapsed.
Click to expand it.
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