summaryrefslogtreecommitdiff
path: root/ext/psych/psych.c
diff options
context:
space:
mode:
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);
}