Another 0.9.1 regression

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);
}

I am calling it from IronRuby as follows:

lock, locked_by = IItemExtensions.getLock(@item, @session)

@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.

From: [email protected]
[mailto:[email protected]] On Behalf Of Orion E.
Sent: Tuesday, September 29, 2009 4:01 PM
To: [email protected]
Subject: [Ironruby-core] Another 0.9.1 regression

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);
}

I am calling it from IronRuby as follows:

lock, locked_by = IItemExtensions.getLock(@item, @session)

@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 ?

Right. I’ll write a C# helper method which converts the out params into
a
structure and return that for now. Cheers

On Wed, Sep 30, 2009 at 12:16 PM, Jimmy S. <

I’ve filed bug

http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2609

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of Orion E.
Sent: Tuesday, September 29, 2009 4:01 PM
To: [email protected]
Subject: [Ironruby-core] Another 0.9.1 regression

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);
}

I am calling it from IronRuby as follows:

lock, locked_by = IItemExtensions.getLock(@item, @session)

@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 ?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs