1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

register class/module

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1999-10-27 04:20:00 +00:00
parent ad39669418
commit cabeaac37b

View file

@ -617,10 +617,11 @@ r_object(arg)
switch (type) {
case TYPE_LINK:
id = r_long(arg);
if (v = rb_hash_aref(arg->data, INT2FIX(id))) {
return v;
v = rb_hash_aref(arg->data, INT2FIX(id));
if (NIL_P(v)) {
rb_raise(rb_eArgError, "dump format error (unlinked)");
}
rb_raise(rb_eArgError, "dump format error (unlinked)");
return v;
break;
case TYPE_UCLASS:
@ -791,7 +792,7 @@ r_object(arg)
{
char *buf;
r_bytes(buf, arg);
return rb_path2class(buf);
return r_regist(rb_path2class(buf), arg);
}
default: