mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
2000-04-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
be72d9a5da
commit
7194267b3b
31 changed files with 589 additions and 831 deletions
12
variable.c
12
variable.c
|
@ -49,8 +49,8 @@ fc_i(key, value, res)
|
|||
name = rb_id2name(key);
|
||||
if (res->path) {
|
||||
path = rb_str_dup(res->path);
|
||||
rb_str_cat(path, "::", 2);
|
||||
rb_str_cat(path, name, strlen(name));
|
||||
rb_str_cat2(path, "::");
|
||||
rb_str_cat2(path, name);
|
||||
}
|
||||
else {
|
||||
path = rb_str_new2(name);
|
||||
|
@ -129,7 +129,7 @@ classname(klass)
|
|||
ID classid = rb_intern("__classid__");
|
||||
|
||||
if (st_lookup(ROBJECT(klass)->iv_tbl, classid, &path)) {
|
||||
path = rb_str_new2(rb_id2name(FIX2INT(path)));
|
||||
path = rb_str_new2(rb_id2name(SYM2ID(path)));
|
||||
st_insert(ROBJECT(klass)->iv_tbl, classpath, path);
|
||||
st_delete(RCLASS(klass)->iv_tbl, &classid, 0);
|
||||
}
|
||||
|
@ -185,8 +185,8 @@ rb_set_class_path(klass, under, name)
|
|||
}
|
||||
else {
|
||||
str = rb_str_dup(rb_class_path(under));
|
||||
rb_str_cat(str, "::", 2);
|
||||
rb_str_cat(str, name, strlen(name));
|
||||
rb_str_cat2(str, "::");
|
||||
rb_str_cat2(str, name);
|
||||
}
|
||||
rb_iv_set(klass, "__classpath__", str);
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ rb_name_class(klass, id)
|
|||
VALUE klass;
|
||||
ID id;
|
||||
{
|
||||
rb_iv_set(klass, "__classid__", INT2FIX(id));
|
||||
rb_iv_set(klass, "__classid__", ID2SYM(id));
|
||||
}
|
||||
|
||||
static st_table *autoload_tbl = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue