]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
rb_cvar_set() takes three arguments in Ruby 1.9
authorTobias Brunner <tobias@strongswan.org>
Mon, 10 Dec 2012 08:41:32 +0000 (09:41 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 10 Dec 2012 08:47:46 +0000 (09:47 +0100)
src/dumm/ext/dumm.c

index 7c7d65acd058bc10b8e17f5d0e17c58e4e5ff2f6..1f047679c122edc51a93fbb722054927a676465a 100644 (file)
@@ -141,7 +141,11 @@ static VALUE guest_hash(VALUE class)
        if (!rb_cvar_defined(class, id))
        {
                VALUE hash = guest_hash_create(class);
+#ifdef RB_CVAR_SET_4_ARGS
                rb_cvar_set(class, id, hash, 0);
+#else
+               rb_cvar_set(class, id, hash);
+#endif
                return hash;
        }
        return rb_cvar_get(class, id);