summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-24 07:21:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-24 07:21:33 +0000
commitabd135d36bef0f340fd914405c8cfe0c0e579f86 (patch)
tree746cf8bdbf40ac507f04156369bae82fc0811dd6 /object.c
parente187c4ca1f5ae20361714507c65281572c88ad19 (diff)
* object.c (rb_Hash): fix mixed declaration and code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/object.c b/object.c
index 63d906e45b..a981319e37 100644
--- a/object.c
+++ b/object.c
@@ -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();