I have a C# method with the following signature
static class IItemExtensions
{
static void getLock(this Interop.IItem item, object session, out
Interop.ILock lock, out string lockedBy);
}
@item is a System.__ComObject (IUnknown based, not IDispatch) which
implements the Interop.IItem method, and @session is another __ComObject
Under 0.9, this worked fine - the two out parameters were assigned to
lock
and locked_by
Under 0.9.1, The method call succeeds (as far as the COM objects are
concerned), but it seems like IronRuby can no longer deal with the out
parameters, and the following exception occurs:
lock, locked_by = IItemExtensions. getLock(@item, @session)
System::NotSupportedException: ConvertToArraySplatAction @1 not
supported on
foreign meta-objects
from (irb):30
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:150:in eval_input' from :0:ineval’
from workspace.rb:80:in evaluate' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:147:ineval_input’
from irb.rb:257:in signal_status' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:146:ineval_input’
from :0:in loop' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:70:instart’
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:69:in start' from :0:incatch’
from C:/Dev/TEST/ruby/bin/iirb:13
from :0:in `catch’
Is there a new way for calling methods with out parameters in 0.9.1 ?
Out arguments still work as a returned array, but this looks like a bug
as the ConvertToArraySplatAction seems to now work when dealing with a
COM object “lock”. I’ll let Tomas field this.
@item is a System.__ComObject (IUnknown based, not IDispatch) which
implements the Interop.IItem method, and @session is another __ComObject
Under 0.9, this worked fine - the two out parameters were assigned to
lock and locked_by
Under 0.9.1, The method call succeeds (as far as the COM objects are
concerned), but it seems like IronRuby can no longer deal with the out
parameters, and the following exception occurs:
lock, locked_by = IItemExtensions. getLock(@item, @session)
System::NotSupportedException: ConvertToArraySplatAction @1 not
supported on foreign meta-objects
from (irb):30
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:150:in eval_input' from :0:in eval’
from workspace.rb:80:in evaluate' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:147:in eval_input’
from irb.rb:257:in signal_status' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:146:in eval_input’
from :0:in loop' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:70:in start’
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:69:in start' from :0:in catch’
from C:/Dev/TEST/ruby/bin/iirb:13
from :0:in `catch’
Is there a new way for calling methods with out parameters in 0.9.1 ?
@item is a System.__ComObject (IUnknown based, not IDispatch) which
implements the Interop.IItem method, and @session is another __ComObject
Under 0.9, this worked fine - the two out parameters were assigned to
lock and locked_by
Under 0.9.1, The method call succeeds (as far as the COM objects are
concerned), but it seems like IronRuby can no longer deal with the out
parameters, and the following exception occurs:
lock, locked_by = IItemExtensions. getLock(@item, @session)
System::NotSupportedException: ConvertToArraySplatAction @1 not
supported on foreign meta-objects
from (irb):30
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:150:in eval_input' from :0:in eval’
from workspace.rb:80:in evaluate' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:147:in eval_input’
from irb.rb:257:in signal_status' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:146:in eval_input’
from :0:in loop' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:70:in start’
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:69:in start' from :0:in catch’
from C:/Dev/TEST/ruby/bin/iirb:13
from :0:in `catch’
Is there a new way for calling methods with out parameters in 0.9.1 ?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.