summaryrefslogtreecommitdiff
path: root/ext/psych/psych.c
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-03-29 13:24:24 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-03-29 13:24:24 -0700
commit7febfa531bf0ebc87f27b2267cb188aa4f1aa7ae (patch)
tree54276d77884c2a6fd71c64785f89c0a581004741 /ext/psych/psych.c
parent184439db603926332122033a46c3e8f149ff79b7 (diff)
downloadpsych-7febfa531bf0ebc87f27b2267cb188aa4f1aa7ae.tar.gz
Author: naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Mon Mar 29 18:58:22 2010 +0000 * ext/psych/{emitter,parser,psych}.c: move variable declaration to the first of the block.
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);
}