Skip to content

Instantly share code, notes, and snippets.

@enebo
Created October 11, 2010 19:36
Show Gist options
  • Save enebo/621082 to your computer and use it in GitHub Desktop.
Save enebo/621082 to your computer and use it in GitHub Desktop.
@Override
public Variant invoke(final String methodName, final Variant[] variantArgs) {
new Thread() {
@Override
public void run() {
ThreadContext context = runtime.getCurrentContext();
int length = variantArgs.length;
IRubyObject[] args = new IRubyObject[length];
for (int i = 0; i < length; i++) {
args[i] = RubyWIN32OLE.fromVariant(runtime, variantArgs[i]);
}
target.callMethod(context, methodName, args);
}
}.start();
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment