ruby-changes:22322
From: nobu <ko1@a...>
Date: Tue, 24 Jan 2012 16:21:42 +0900 (JST)
Subject: [ruby-changes:22322] nobu:r34371 (trunk): * object.c (rb_Hash): fix mixed declaration and code.
nobu 2012-01-24 16:21:33 +0900 (Tue, 24 Jan 2012) New Revision: 34371 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34371 Log: * object.c (rb_Hash): fix mixed declaration and code. Modified files: trunk/object.c Index: object.c =================================================================== --- object.c (revision 34370) +++ object.c (revision 34371) @@ -2597,8 +2597,10 @@ 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(); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/