summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-08-20 23:38:37 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-08-20 23:38:37 +0900
commit05ede52239fce58b6a8be4b72d51db10ae1c2632 (patch)
tree672bd9cb5d67c17023e39bdab72f625760cba24b /src
parentae2d49811a51e38106f34858fd3f4ce24af320c2 (diff)
downloadmruby-05ede52239fce58b6a8be4b72d51db10ae1c2632.tar.gz
mruby-05ede52239fce58b6a8be4b72d51db10ae1c2632.zip
should use non NULL scope for raise_error(); ref #2547
Diffstat (limited to 'src')
-rw-r--r--src/codegen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 6e81a51bf..48ab63de0 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -554,7 +554,7 @@ for_body(codegen_scope *s, node *tree)
/* generate loop-block */
s = scope_new(s->mrb, s, NULL);
if (s == NULL) {
- raise_error(s, "unexpected scope");
+ raise_error(prev, "unexpected scope");
}
push(); /* push for a block parameter */
@@ -595,7 +595,7 @@ lambda_body(codegen_scope *s, node *tree, int blk)
codegen_scope *parent = s;
s = scope_new(s->mrb, s, tree->car);
if (s == NULL) {
- raise_error(s, "unexpected scope");
+ raise_error(parent, "unexpected scope");
}
s->mscope = !blk;