From 004138a45e1dc99c7a3ed61d6ee000b6638ae325 Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 21 Jun 2019 21:10:51 +0200 Subject: Add ice_isFixed - Close #356 --- ruby/src/IceRuby/Proxy.cpp | 14 ++++++++++++++ ruby/test/Ice/proxy/AllTests.rb | 2 ++ 2 files changed, 16 insertions(+) (limited to 'ruby') diff --git a/ruby/src/IceRuby/Proxy.cpp b/ruby/src/IceRuby/Proxy.cpp index d5b1c175baa..c06588261fe 100644 --- a/ruby/src/IceRuby/Proxy.cpp +++ b/ruby/src/IceRuby/Proxy.cpp @@ -919,6 +919,19 @@ IceRuby_ObjectPrx_ice_fixed(VALUE self, VALUE con) return Qnil; } +extern "C" +VALUE +IceRuby_ObjectPrx_ice_isFixed(VALUE self) +{ + ICE_RUBY_TRY + { + Ice::ObjectPrx p = getProxy(self); + return p->ice_isFixed() ? Qtrue : Qfalse; + } + ICE_RUBY_CATCH + return Qnil; +} + extern "C" VALUE IceRuby_ObjectPrx_ice_getConnection(VALUE self) @@ -1329,6 +1342,7 @@ IceRuby::initProxy(VALUE iceModule) rb_define_method(_proxyClass, "ice_getTimeout", CAST_METHOD(IceRuby_ObjectPrx_ice_getTimeout), 0); rb_define_method(_proxyClass, "ice_connectionId", CAST_METHOD(IceRuby_ObjectPrx_ice_connectionId), 1); rb_define_method(_proxyClass, "ice_fixed", CAST_METHOD(IceRuby_ObjectPrx_ice_fixed), 1); + rb_define_method(_proxyClass, "ice_isFixed", CAST_METHOD(IceRuby_ObjectPrx_ice_isFixed), 0); rb_define_method(_proxyClass, "ice_getConnection", CAST_METHOD(IceRuby_ObjectPrx_ice_getConnection), 0); rb_define_method(_proxyClass, "ice_getCachedConnection", CAST_METHOD(IceRuby_ObjectPrx_ice_getCachedConnection), 0); rb_define_method(_proxyClass, "ice_flushBatchRequests", CAST_METHOD(IceRuby_ObjectPrx_ice_flushBatchRequests), 0); diff --git a/ruby/test/Ice/proxy/AllTests.rb b/ruby/test/Ice/proxy/AllTests.rb index cde9fef06b8..3a923e4d0d1 100644 --- a/ruby/test/Ice/proxy/AllTests.rb +++ b/ruby/test/Ice/proxy/AllTests.rb @@ -651,6 +651,8 @@ def allTests(helper, communicator) STDOUT.flush connection = cl.ice_getConnection() if connection != nil + test(!cl.ice_isFixed()) + test(cl.ice_fixed(connection).ice_isFixed()) cl.ice_fixed(connection).getContext() test(cl.ice_secure(true).ice_fixed(connection).ice_isSecure()) test(cl.ice_facet("facet").ice_fixed(connection).ice_getFacet() == "facet") -- cgit v1.2.3