]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Make rlm_ruby build for >= ruby 1.9.1
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 27 Nov 2012 21:54:12 +0000 (21:54 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 27 Nov 2012 21:54:12 +0000 (21:54 +0000)
src/modules/rlm_ruby/rlm_ruby.c

index f93f1febc18a8bcfae4b5704570ae2b3009ef4c6..1bbf39e66cd312e03ac95a43a1df1093b6bb6b94 100644 (file)
@@ -119,7 +119,7 @@ static void add_vp_tuple(VALUE_PAIR **vpp, VALUE rb_value,
     }
 
     /* Get the array size. */
-    outertuplesize = RARRAY(rb_value)->len;
+    outertuplesize = RARRAY_LEN(rb_value);
 
     for (i = 0; i < outertuplesize; i++) {
         VALUE pTupleElement = rb_ary_entry(rb_value, i);
@@ -130,7 +130,7 @@ static void add_vp_tuple(VALUE_PAIR **vpp, VALUE rb_value,
             /* Check if it's a pair */
             int tuplesize;
 
-            if ((tuplesize = RARRAY(pTupleElement)->len) != 2) {
+            if ((tuplesize = RARRAY_LEN(pTupleElement)) != 2) {
                 radlog(L_ERR, "%s: tuple element %d is a tuple "
                         " of size %d. must be 2\n", function_name,
                         i, tuplesize);