Hi,

At Wed, 19 Feb 2003 14:27:18 +0900,
nobu.nokada / softhome.net wrote:
> Like this?

Oops, missed.


--- eval.c~ Wed Feb 19 10:37:51 2003 +++ eval.c Wed Feb 19 14:34:07 2003 @@ -2229,5 +2229,14 @@ class_prefix(self, cpath) } if (cpath->nd_head) { - return rb_eval(self, cpath->nd_head); + VALUE c = rb_eval(self, cpath->nd_head); + switch (TYPE(c)) { + case T_CLASS: + case T_MODULE: + break; + default: + rb_raise(rb_eTypeError, "%s is not a class/module", + RSTRING(rb_obj_as_string(c))->ptr); + } + return c; } else if (nd_type(cpath) == NODE_COLON2) {
-- Nobu Nakada