diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-03 01:18:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-03 01:18:31 +0000 |
commit | 63e8110bfc153acc858dbe51017fbb2395f559d7 (patch) | |
tree | 8ed3e50dc6e1e69b552e574538a3264af606ad35 /enumerator.c | |
parent | ecabd1692355ea81d120a5f34f1f36046de92167 (diff) | |
download | ruby-63e8110bfc153acc858dbe51017fbb2395f559d7.tar.gz |
* enumerator.c (inspect_enumerator): suppress uninitialized
instance variable warnings. [ruby-dev:45449][Bug #6214]
patched by no6v (Nobuhiro IMAI).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r-- | enumerator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/enumerator.c b/enumerator.c index 3f50e9563c..ef1d9ccfbc 100644 --- a/enumerator.c +++ b/enumerator.c @@ -875,7 +875,7 @@ inspect_enumerator(VALUE obj, VALUE dummy, int recur) return str; } - eobj = rb_iv_get(obj, "receiver"); + eobj = rb_attr_get(obj, rb_intern("receiver")); if (NIL_P(eobj)) { eobj = e->obj; } @@ -886,7 +886,7 @@ inspect_enumerator(VALUE obj, VALUE dummy, int recur) /* (1..100).each_cons(2) => "#<Enumerator: 1..100:each_cons(2)>" */ str = rb_sprintf("#<%s: ", cname); rb_str_concat(str, rb_inspect(eobj)); - method = rb_iv_get(obj, "method"); + method = rb_attr_get(obj, rb_intern("method")); if (NIL_P(method)) { rb_str_buf_cat2(str, ":"); rb_str_buf_cat2(str, rb_id2name(e->meth)); @@ -897,7 +897,7 @@ inspect_enumerator(VALUE obj, VALUE dummy, int recur) rb_str_buf_cat2(str, rb_id2name(SYM2ID(method))); } - eargs = rb_iv_get(obj, "arguments"); + eargs = rb_attr_get(obj, rb_intern("arguments")); if (NIL_P(eargs)) { eargs = e->args; } |