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 | fc41a9cb7df48d67eb6ee77fe8ce3f6bb3757ce4 (patch) | |
tree | bcccfeb74a7a975d713727a964e89fd53cc80e05 /hash.c | |
parent | 122d4994c7ce43b08e66da1c7d1fdce549a3f3ba (diff) | |
download | ruby-fc41a9cb7df48d67eb6ee77fe8ce3f6bb3757ce4.tar.gz ruby-fc41a9cb7df48d67eb6ee77fe8ce3f6bb3757ce4.tar.xz ruby-fc41a9cb7df48d67eb6ee77fe8ce3f6bb3757ce4.zip |
19991201
git-svn-id: http://svn.ruby-lang.org/repos/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; |