aboutsummaryrefslogtreecommitdiffstats
path: root/src/dumm/ext
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-12-10 09:41:32 +0100
committerTobias Brunner <tobias@strongswan.org>2012-12-10 09:47:46 +0100
commit6a25122bfca4917f38092f3f0c4fddeb8798fb39 (patch)
tree854c4aa672b7f1a0daeea3b5261e5f61c43bb521 /src/dumm/ext
parentd972975d877bb4129649b79b399c061bea02c725 (diff)
downloadstrongswan-6a25122bfca4917f38092f3f0c4fddeb8798fb39.tar.bz2
strongswan-6a25122bfca4917f38092f3f0c4fddeb8798fb39.tar.xz
rb_cvar_set() takes three arguments in Ruby 1.9
Diffstat (limited to 'src/dumm/ext')
-rw-r--r--src/dumm/ext/dumm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dumm/ext/dumm.c b/src/dumm/ext/dumm.c
index 7c7d65acd..1f047679c 100644
--- a/src/dumm/ext/dumm.c
+++ b/src/dumm/ext/dumm.c
@@ -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);