summaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-12 15:39:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-12 15:39:19 +0000
commitc9febcaa13fb2c20edb2c4c9c7499ad11b09be70 (patch)
treee8b8b72083e11a552c8091d3d5e78ba42fbaa5c8 /object.c
parent59f0922bc33941a2f5d28874c75031d1b1da9b50 (diff)
downloadruby-c9febcaa13fb2c20edb2c4c9c7499ad11b09be70.tar.gz
ruby-c9febcaa13fb2c20edb2c4c9c7499ad11b09be70.tar.xz
ruby-c9febcaa13fb2c20edb2c4c9c7499ad11b09be70.zip
* object.c (rb_mod_cvar_defined): wrong id check. a patch from
Mauricio Fernandez <mfp at acm.org>. [ruby-core:09158] * object.c (rb_mod_cvar_get): typo fixed. [ruby-core:09168] * object.c (rb_mod_cvar_set): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/object.c b/object.c
index a4cfda9b3..6aaecd141 100644
--- a/object.c
+++ b/object.c
@@ -1707,7 +1707,7 @@ rb_mod_cvar_get(VALUE obj, VALUE 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);
}
@@ -1735,7 +1735,7 @@ rb_mod_cvar_set(VALUE obj, VALUE iv, VALUE 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;
@@ -1760,8 +1760,8 @@ rb_mod_cvar_defined(VALUE obj, VALUE 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);
}