-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework proxy creation in Ruby #2467
Conversation
@@ -5,7 +5,7 @@ | |||
def batchOneways(p) | |||
bs1 = "\0" * (10 * 1024); | |||
|
|||
batch = Test::MyClassPrx::uncheckedCast(p.ice_batchOneway()) | |||
batch = p.ice_batchOneway() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proxy factory methods in Ruby preserve types, but the tests didn't know it?
@@ -1150,9 +1150,13 @@ IceRuby_ObjectPrx_ice_staticId(VALUE /*self*/) | |||
} | |||
|
|||
extern "C" VALUE | |||
IceRuby_ObjectPrx_new(int /*argc*/, VALUE* /*args*/, VALUE /*self*/) | |||
IceRuby_ObjectPrx_new(VALUE self, VALUE communicator, VALUE proxyString) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method was already provided, but not implemented!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
We typically check the number of arguments and their types for such methods. |
I'll look into it in a follow-up PR. |
This PR allows you to create a proxy with simply
FooBarPrx.new(communicator, proxyString)
in Ruby.It also updates the tests to:
new
Note that since Ruby doesn't support method overloading, we can't use new as an alias for uncheckedCast. So uncheckedCast stays.