summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-12 15:35:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-12 15:35:50 +0000
commitefbd0e3b7d1c624daa1e89bb36ea01ec3faefbed (patch)
treeedaa821d50f0b93dc79bd38675e74bb32b4831e7 /object.c
parent7d97f100286ad3acbef1932f07bc9701c6144c41 (diff)
* 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
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 cbadb9c295..5f97357e71 100644
--- a/object.c
+++ b/object.c
@@ -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);
}