From e43b94231b76d1953b51ba36e7e7fd6399fd2851 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 29 Mar 2010 18:58:22 +0000 Subject: * ext/psych/{emitter,parser,psych}.c: move variable declaration to the first of the block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/psych/psych.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) mode change 100644 => 100755 ext/psych/psych.c (limited to 'ext/psych/psych.c') diff --git a/ext/psych/psych.c b/ext/psych/psych.c old mode 100644 new mode 100755 index ff035af705..69ff1d8dfc --- a/ext/psych/psych.c +++ b/ext/psych/psych.c @@ -7,14 +7,13 @@ static VALUE libyaml_version(VALUE module) { int major, minor, patch; + VALUE list[3]; yaml_get_version(&major, &minor, &patch); - VALUE list[3] = { - INT2NUM((long)major), - INT2NUM((long)minor), - INT2NUM((long)patch) - }; + list[0] = INT2NUM((long)major); + list[1] = INT2NUM((long)minor); + list[2] = INT2NUM((long)patch); return rb_ary_new4((long)3, list); } -- cgit v1.2.3