diff options
| author | Keita Obo <[email protected]> | 2013-09-18 00:20:13 +0900 |
|---|---|---|
| committer | Keita Obo <[email protected]> | 2013-09-18 00:20:13 +0900 |
| commit | 0bce3a36d2b6b0d4bccdbf3b75b279a13fbb22e4 (patch) | |
| tree | ee3608eee388bcc6a40d627ff3b7a313341d0193 /src | |
| parent | ccadbbeb8425eac6b7e6b0503a12dad5541d6d54 (diff) | |
| download | mruby-0bce3a36d2b6b0d4bccdbf3b75b279a13fbb22e4.tar.gz mruby-0bce3a36d2b6b0d4bccdbf3b75b279a13fbb22e4.zip | |
Fixed self value in a block is changed with return value
fix #1504
Diffstat (limited to 'src')
| -rw-r--r-- | src/codegen.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c index 1efc44ba0..7e5a7fa50 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -286,8 +286,7 @@ genop_peep(codegen_scope *s, mrb_code i, int val) case OP_RANGE: case OP_AREF: case OP_GETUPVAR: - s->iseq[s->pc-1] = MKOP_ABC(c0, 0, GETARG_B(i0), GETARG_C(i0)); - genop(s, MKOP_AB(OP_RETURN, 0, OP_R_NORMAL)); + genop(s, MKOP_AB(OP_RETURN, GETARG_A(i0), OP_R_NORMAL)); return; case OP_SETIV: case OP_SETCV: |
