[Ironruby-core] VB.Net - Ruby interop

Julian Bishop bishop.julian at gmail.com
Mon Jun 7 01:33:00 EDT 2010


Hi,

A couple of technical questions regarding how to leverage Ruby from VB.Net
and vice versa:

1) Is the ScriptScope the only option for passing object refs into Ruby? I
mean can they also be passed as parameters to the Ruby methods called by
InvokeMember?

2) Ruby has no need for passing parameters "ByRef" like you can in VB
because Ruby's return statement so naturally returns an arbitrary list of
objects as an array, and Ruby supports multiple assignment on a single line.
But I have legacy VB methods with ByRef parameters that really do change
which objects the parameters reference in the caller. I would like to be
able to call these VB methods from Ruby code, but since Ruby has no such
thing as ByRef, I don't know what kind of behavior I should expect. Can the
Ruby variables passed as parameters get reassigned by VB code to point to VB
objects without any additional shenanigans? If not, then is there an
established workaround for ByRef parameters? Has this odd situation been
addressed yet? (I don't want to rewrite/retest legacy code that already
works just fine).

Thanks,

Julian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100607/eb1f8b4f/attachment.html>


More information about the Ironruby-core mailing list