aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-28 14:14:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-28 14:14:11 +0000
commit88ba175ab0c87882e446a5290ddc84880310d6d3 (patch)
tree09692f360f32ef7d36ba22a4008a9455829343d7 /eval.c
parent55bf54a9c062b30492b328345ab3c68449e3f676 (diff)
downloadruby-88ba175ab0c87882e446a5290ddc84880310d6d3.tar.gz
* bignum.c (rb_big_and): protect parameters from GC.
[ruby-talk:110664] * error.c (exc_equal): exceptions are equal if they share same class, message and backtrace. [ruby-talk:110354] * error.c (name_err_mesg_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 19e6a361c3..3829be617f 100644
--- a/eval.c
+++ b/eval.c
@@ -3765,6 +3765,9 @@ rb_eval(self, n)
ID cname;
int gen = Qfalse;
+ cbase = class_prefix(self, node->nd_cpath);
+ cname = node->nd_cpath->nd_mid;
+
if (NIL_P(ruby_cbase)) {
rb_raise(rb_eTypeError, "no outer class/module");
}
@@ -3775,8 +3778,6 @@ rb_eval(self, n)
super = 0;
}
- cbase = class_prefix(self, node->nd_cpath);
- cname = node->nd_cpath->nd_mid;
if (rb_const_defined_at(cbase, cname)) {
klass = rb_const_get_at(cbase, cname);
if (TYPE(klass) != T_CLASS) {