diff options
-rw-r--r-- | object.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2597,8 +2597,10 @@ rb_f_array(VALUE obj, VALUE arg) VALUE rb_Hash(VALUE val) { + VALUE tmp; + if (NIL_P(val)) return rb_hash_new(); - VALUE tmp = rb_check_hash_type(val); + tmp = rb_check_hash_type(val); if (NIL_P(tmp)) { if (RB_TYPE_P(val, T_ARRAY) && RARRAY_LEN(val) == 0) return rb_hash_new(); |