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

* object.c (rb_mod_cvar_defined): wrong id check. [ruby-core:09158]

* object.c (rb_mod_cvar_get): typo fixed.  [ruby-core:09168]

* object.c (rb_mod_cvar_set): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-10-12 15:35:50 +00:00
parent 7d97f10028
commit efbd0e3b7d
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,11 @@
Fri Oct 13 00:34:26 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* object.c (rb_mod_cvar_defined): wrong id check. [ruby-core:09158]
* object.c (rb_mod_cvar_get): typo fixed. [ruby-core:09168]
* object.c (rb_mod_cvar_set): ditto.
Wed Oct 11 22:21:41 2006 Akinori MUSHA <knu@iDaemons.org>
* ext/digest: Merge from trunk; metadata location changed,

View file

@ -2052,7 +2052,7 @@ rb_mod_cvar_get(obj, iv)
ID id = rb_to_id(iv);
if (!rb_is_class_id(id)) {
rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_name_error(id, "`%s' is not allowed as a class variable name", rb_id2name(id));
}
return rb_cvar_get(obj, id);
}
@ -2085,7 +2085,7 @@ rb_mod_cvar_set(obj, iv, val)
ID id = rb_to_id(iv);
if (!rb_is_class_id(id)) {
rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_name_error(id, "`%s' is not allowed as a class variable name", rb_id2name(id));
}
rb_cvar_set(obj, id, val, Qfalse);
return val;
@ -2111,8 +2111,8 @@ rb_mod_cvar_defined(obj, iv)
{
ID id = rb_to_id(iv);
if (!rb_is_instance_id(id)) {
rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
if (!rb_is_class_id(id)) {
rb_name_error(id, "`%s' is not allowed as a class variable name", rb_id2name(id));
}
return rb_cvar_defined(obj, id);
}