From: Marcus Comstedt Date: Wed, 16 Nov 2016 15:42:37 +0000 (+0100) Subject: Bindings: Make Ruby bindings build with Ruby 2.0 X-Git-Tag: libsigrok-0.5.0~171 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f504779c120713727d2d01cbd3ad38175a829a4f;p=libsigrok.git 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. --- diff --git a/bindings/ruby/classes.i b/bindings/ruby/classes.i index 96bd3770..5e4baf07 100644 --- a/bindings/ruby/classes.i +++ b/bindings/ruby/classes.i @@ -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(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); }; }