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 7c7d65a..1f04767 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);