summaryrefslogtreecommitdiff
path: root/ext/psych/psych.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-29 18:58:22 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-29 18:58:22 +0000
commite43b94231b76d1953b51ba36e7e7fd6399fd2851 (patch)
tree5ddc3d9635beb92ac3bb1c632350e595ec27419a /ext/psych/psych.c
parent7abf7e58e82ecd71655f85c0600a94d3f74c3018 (diff)
* 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
Diffstat (limited to 'ext/psych/psych.c')
-rwxr-xr-x[-rw-r--r--]ext/psych/psych.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/psych/psych.c b/ext/psych/psych.c
index ff035af..69ff1d8 100644..100755
--- 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);
}