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

* variable.c (generic_ivar_get): rb_attr_get should not warn.

[ruby-dev:26010]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2005-05-13 08:56:40 +00:00
parent 6bbd130b4d
commit 74eab43d49
2 changed files with 12 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Fri May 13 17:50:49 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* variable.c (generic_ivar_get): rb_attr_get should not warn.
[ruby-dev:26010]
Thu May 12 17:41:00 2005 NARUSE, Yui <naruse@ruby-lang.org>
* ext/nkf/nkf-utf8/nkf.c: follow nkf 2.0.5

View file

@ -842,9 +842,10 @@ rb_generic_ivar_table(obj)
}
static VALUE
generic_ivar_get(obj, id)
generic_ivar_get(obj, id, warn)
VALUE obj;
ID id;
int warn;
{
st_table *tbl;
VALUE val;
@ -856,8 +857,9 @@ generic_ivar_get(obj, id)
}
}
}
rb_warning("instance variable %s not initialized", rb_id2name(id));
if (warn) {
rb_warning("instance variable %s not initialized", rb_id2name(id));
}
return Qnil;
}
@ -1011,13 +1013,12 @@ ivar_get(obj, id, warn)
break;
default:
if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
return generic_ivar_get(obj, id);
return generic_ivar_get(obj, id, warn);
break;
}
if (warn && ruby_verbose) {
if (warn) {
rb_warning("instance variable %s not initialized", rb_id2name(id));
}
return Qnil;
}