summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matz Matsumoto <[email protected]>2013-02-10 01:11:09 +0900
committerYukihiro Matz Matsumoto <[email protected]>2013-02-10 01:11:09 +0900
commit06c06d5c36814e8e5321923fa2e0483e6ea9abc5 (patch)
tree824fb95520c7fb9b089a90bb7090fa1958961733 /src
parent84a7c9ed1c7781b53344c14adac722bc27798dcf (diff)
parent9a439245dfcbe520a9d2f6b70cb056b9ad351365 (diff)
downloadmruby-06c06d5c36814e8e5321923fa2e0483e6ea9abc5.tar.gz
mruby-06c06d5c36814e8e5321923fa2e0483e6ea9abc5.zip
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'src')
-rw-r--r--src/parse.y2
-rw-r--r--src/vm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y
index 9ee9c9bec..91fb1a8e8 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -3000,7 +3000,7 @@ yywarn(parser_state *p, const char *s)
}
#endif
}
- else if (p->nerr < sizeof(p->warn_buffer) / sizeof(p->warn_buffer[0])) {
+ else if (p->nwarn < sizeof(p->warn_buffer) / sizeof(p->warn_buffer[0])) {
n = strlen(s);
c = (char *)parser_palloc(p, n + 1);
memcpy(c, s, n + 1);
diff --git a/src/vm.c b/src/vm.c
index a2df8abdf..bde38612e 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1160,7 +1160,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
L_RAISE:
ci = mrb->ci;
mrb_obj_iv_ifnone(mrb, mrb->exc, mrb_intern(mrb, "lastpc"), mrb_voidp_value(pc));
- mrb_obj_iv_set(mrb, mrb->exc, mrb_intern(mrb, "ciidx"), mrb_fixnum_value(ci - mrb->cibase));
+ mrb_obj_iv_ifnone(mrb, mrb->exc, mrb_intern(mrb, "ciidx"), mrb_fixnum_value(ci - mrb->cibase));
eidx = ci->eidx;
if (ci == mrb->cibase) {
if (ci->ridx == 0) goto L_STOP;