diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-06 02:55:07 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-06 02:55:07 +0000 |
commit | a0f515b1a63222c4d959638b5121fd1cfcb43625 (patch) | |
tree | ecf28792332ddbe8be13afcb7bc85cfda7bb7a4e | |
parent | cbb55f864d74403d239358bc49dc8c8fdbd92b96 (diff) | |
download | ruby-a0f515b1a63222c4d959638b5121fd1cfcb43625.tar.gz |
* variable.c (rb_cvar_set): remove warn argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/matzruby@11491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | eval.c | 8 | ||||
-rw-r--r-- | intern.h | 3 | ||||
-rw-r--r-- | object.c | 2 | ||||
-rw-r--r-- | variable.c | 6 |
5 files changed, 13 insertions, 10 deletions
@@ -2,6 +2,10 @@ Sat Jan 6 11:50:33 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * io.c (argf_read): fix wrong replacement. [ruby-dev:30070] +Thu Jan 4 16:24:15 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * variable.c (rb_cvar_set): remove warn argument. + Wed Jan 3 18:49:15 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * io.c (rb_io_getline): lineno update condition was wrong. @@ -3500,12 +3500,12 @@ rb_eval(VALUE self, NODE *n) rb_raise(rb_eTypeError, "no class/module to define class variable"); } result = rb_eval(self, node->nd_value); - rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue); + rb_cvar_set(cvar_cbase(), node->nd_vid, result); break; case NODE_CVASGN: result = rb_eval(self, node->nd_value); - rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse); + rb_cvar_set(cvar_cbase(), node->nd_vid, result); break; case NODE_LVAR: @@ -5072,11 +5072,11 @@ assign(VALUE self, NODE *lhs, VALUE val, int pcall) if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) { rb_warn("declaring singleton class variable"); } - rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue); + rb_cvar_set(cvar_cbase(), lhs->nd_vid, val); break; case NODE_CVASGN: - rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qfalse); + rb_cvar_set(cvar_cbase(), lhs->nd_vid, val); break; case NODE_MASGN: @@ -576,8 +576,7 @@ VALUE rb_const_get_fallback(VALUE, ID, struct RNode *); void rb_const_set(VALUE, ID, VALUE); VALUE rb_mod_const_missing(VALUE,VALUE); VALUE rb_cvar_defined(VALUE, ID); -#define RB_CVAR_SET_4ARGS 1 -void rb_cvar_set(VALUE, ID, VALUE, int); +void rb_cvar_set(VALUE, ID, VALUE); VALUE rb_cvar_get(VALUE, ID); void rb_cv_set(VALUE, const char*, VALUE); VALUE rb_cv_get(VALUE, const char*); @@ -1793,7 +1793,7 @@ rb_mod_cvar_set(VALUE obj, VALUE iv, VALUE val) if (!rb_is_class_id(id)) { rb_name_error(id, "`%s' is not allowed as a class variable name", rb_id2name(id)); } - rb_cvar_set(obj, id, val, Qfalse); + rb_cvar_set(obj, id, val); return val; } diff --git a/variable.c b/variable.c index 7afe794928..6b3c52c21e 100644 --- a/variable.c +++ b/variable.c @@ -1591,7 +1591,7 @@ rb_define_global_const(const char *name, VALUE val) } void -rb_cvar_set(VALUE klass, ID id, VALUE val, int warn) +rb_cvar_set(VALUE klass, ID id, VALUE val) { mod_av_set(klass, id, val, Qfalse); } @@ -1626,7 +1626,7 @@ rb_cv_set(VALUE klass, const char *name, VALUE val) if (!rb_is_class_id(id)) { rb_name_error(id, "wrong class variable name %s", name); } - rb_cvar_set(klass, id, val, Qfalse); + rb_cvar_set(klass, id, val); } VALUE @@ -1647,7 +1647,7 @@ rb_define_class_variable(VALUE klass, const char *name, VALUE val) if (!rb_is_class_id(id)) { rb_name_error(id, "wrong class variable name %s", name); } - rb_cvar_set(klass, id, val, Qtrue); + rb_cvar_set(klass, id, val); } static int |