diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-12-01 09:24:48 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-12-01 09:24:48 +0000 |
commit | a3f29338ad53c1027eeef0d3c7168d3355105d20 (patch) | |
tree | bcccfeb74a7a975d713727a964e89fd53cc80e05 /hash.c | |
parent | 40517ecac82e4b406227bd30fd89d05c2e90bc87 (diff) |
19991201
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -689,8 +689,12 @@ static VALUE hash_to_s(hash) VALUE hash; { + VALUE str; + if (rb_inspecting_p(hash)) return rb_str_new2("{...}"); - return rb_ary_to_s(rb_hash_to_a(hash)); + str = rb_ary_to_s(rb_hash_to_a(hash)); + if (OBJ_TAINTED(hash)) OBJ_TAINT(str); + return hash; } static VALUE @@ -798,7 +802,7 @@ equal_i(key, val1, data) { VALUE val2; - if (val1 == Qnil) return ST_CONTINUE; + if (key == Qnil) return ST_CONTINUE; if (!st_lookup(data->tbl, key, &val2)) { data->result = Qfalse; return ST_STOP; |