summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-20 14:17:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-20 14:17:16 +0000
commitf2f08335df6a84ad82bba9defe7e5f3e7cfd8d55 (patch)
treec60fdd6e8593ab70974d6330a738c668658fc316 /vm.c
parentcf82149d213c7e140bd6c50072598a2fa19af45b (diff)
* vm_core.h (struct rb_thread_struct): removed first_func_arg and
reuse first_args instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/vm.c b/vm.c
index c87017814d..e09497dd49 100644
--- a/vm.c
+++ b/vm.c
@@ -180,7 +180,7 @@ check_env_value(VALUE envval)
if (check_env(env)) {
return envval;
}
- rb_bug("invalid env\n");
+ rb_bug("invalid env");
return Qnil; /* unreachable */
}
@@ -209,8 +209,7 @@ vm_make_env_each(rb_thread_t *th, rb_control_frame_t *cfp,
pcfp++;
if (pcfp->dfp == 0) {
SDR();
- printf("[BUG] orz\n");
- exit(0);
+ rb_bug("invalid dfp");
}
}
penvval = vm_make_env_each(th, pcfp, penvptr, endptr);
@@ -485,7 +484,7 @@ vm_call0(rb_thread_t *th, VALUE klass, VALUE recv,
break;
}
default:
- rb_bug("unsupported: vm_call0");
+ rb_bug("unsupported: vm_call0(%s)", ruby_node_name(nd_type(body)));
}
RUBY_VM_CHECK_INTS();
return val;
@@ -501,7 +500,7 @@ vm_call_super(rb_thread_t *th, int argc, const VALUE *argv)
int nosuper = 0;
rb_control_frame_t *cfp = th->cfp;
- if (!th->cfp->iseq) {
+ if (!cfp->iseq) {
klass = cfp->method_klass;
klass = RCLASS(klass)->super;
@@ -1572,7 +1571,7 @@ rb_thread_mark(void *ptr)
/* mark ruby objects */
RUBY_MARK_UNLESS_NULL(th->first_proc);
- RUBY_MARK_UNLESS_NULL(th->first_args);
+ if (th->first_proc) RUBY_MARK_UNLESS_NULL(th->first_args);
RUBY_MARK_UNLESS_NULL(th->thgroup);
RUBY_MARK_UNLESS_NULL(th->value);