diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-08-14 08:11:00 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-08-14 08:11:00 +0000 |
commit | d1ad7910dbffb61b3e857c6684027c2f48cb809b (patch) | |
tree | e845b13bf92e41147a892336be5308ab78246289 /array.c | |
parent | b68534bf4eee4593362f8abdd823a09df5d1976b (diff) |
* string.c (rb_str_cmp): remove needless conditional.
* array.c (rb_inspecting_p): initialize inspect_key if it is
not initialized yet.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -849,7 +849,9 @@ rb_inspecting_p(obj) { VALUE inspect_tbl; - if (!inspect_key) return Qfalse; + if (!inspect_key) { + inspect_key = rb_intern("__inspect_key__"); + } inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key); if (NIL_P(inspect_tbl)) return Qfalse; return rb_ary_includes(inspect_tbl, rb_obj_id(obj)); |