Bindings: Make Ruby bindings build with Ruby 2.0

The alias "rb_ary_new_from_args" for "rb_ary_new3" was not introduced
until in Ruby 2.1.
This commit is contained in:
Marcus Comstedt 2016-11-16 16:42:37 +01:00 committed by Uwe Hermann
parent ced210d53a
commit f504779c12
1 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ static VALUE variant_to_ruby(Glib::VariantBase variant)
VALUE string_obj = rb_external_str_new_with_enc(message.c_str(), message.length(), rb_utf8_encoding());
VALUE args = rb_ary_new_from_args(2, log_obj, string_obj);
VALUE args = rb_ary_new3(2, log_obj, string_obj);
rb_proc_call(*proc.get(), args);
};
}
@ -176,7 +176,7 @@ static VALUE variant_to_ruby(Glib::VariantBase variant)
SWIG_as_voidptr(new std::shared_ptr<sigrok::Packet>(packet)),
SWIGTYPE_p_std__shared_ptrT_sigrok__Packet_t, SWIG_POINTER_OWN);
VALUE args = rb_ary_new_from_args(2, device_obj, packet_obj);
VALUE args = rb_ary_new3(2, device_obj, packet_obj);
rb_proc_call(*proc.get(), args);
};
}