diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-22 09:12:24 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-22 09:12:24 +0000 |
commit | def42c9a0cd274202da56531c19e0a4bee3364e3 (patch) | |
tree | b100f68b08e5f1ae5338055ae798320a4a339e01 /hash.c | |
parent | ef8e0b4dffaec6789a1582d841ddb563cac2115d (diff) |
* eval.c (rb_yield_0): no mvalue_to_svalue conversion here.
* eval.c (massign): takes svalue, convert it to mvalue inside.
* eval.c (rb_eval): parameters for yield/return are always
svalues now.
* eval.c (svalue_to_mvalue): more strict conversion.
* eval.c (mvalue_to_svalue): ditto.
* st.c (new_size): prime hash size enabled.
* ext/socket/socket.c (Init_socket): SO_* constants added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -668,7 +668,8 @@ static VALUE rb_hash_inspect(hash) VALUE hash; { - if (RHASH(hash)->tbl->num_entries == 0) return rb_str_new2("{}"); + if (RHASH(hash)->tbl == 0 || RHASH(hash)->tbl->num_entries == 0) + return rb_str_new2("{}"); if (rb_inspecting_p(hash)) return rb_str_new2("{...}"); return rb_protect_inspect(inspect_hash, hash, 0); } |