summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-11 16:25:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-11 16:25:24 +0000
commit04eb14eb2d99205c2d1c8bcadafa8b0189f86da1 (patch)
tree9d6539bd5778d6487c69f2af31600186bf62b152 /eval.c
parentc001b601f7363347ec1ebb5c8977aef4036a8d51 (diff)
downloadruby-04eb14eb2d99205c2d1c8bcadafa8b0189f86da1.tar.gz
ruby-04eb14eb2d99205c2d1c8bcadafa8b0189f86da1.tar.xz
ruby-04eb14eb2d99205c2d1c8bcadafa8b0189f86da1.zip
* eval.c (unknown_node): ignore broken NODE to get rid of accessing
possibly inaccessible address. fixed: [ruby-dev:26122] should emit more useful information like [ruby-dev:26126], though. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 0b884ebe2..55b97de97 100644
--- a/eval.c
+++ b/eval.c
@@ -2760,6 +2760,15 @@ class_prefix(self, cpath)
NORETURN(static void return_jump _((VALUE)));
NORETURN(static void break_jump _((VALUE)));
+NORETURN(static void unknown_node _((NODE *)));
+
+static void
+unknown_node(node)
+ NODE *volatile node;
+{
+ ruby_current_node = 0;
+ rb_bug("unknown node type %d", nd_type(node));
+}
static VALUE
rb_eval(self, n)
@@ -3993,7 +4002,7 @@ rb_eval(self, n)
break;
default:
- rb_bug("unknown node type %d", nd_type(node));
+ unknown_node(node);
}
finish:
CHECK_INTS;
@@ -5842,7 +5851,7 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper)
break;
default:
- rb_bug("unknown node type %d", nd_type(body));
+ unknown_node(body);
break;
}
POP_FRAME();