# Another 0.9.1 regression

**URL:** <https://www.ruby-forum.com/t/another-0-9-1-regression/176392>\
**Category:** IronRuby\
**Created:** [September 30, 2009, 1:01am UTC](https://www.ruby-forum.com/t/another-0-9-1-regression/176392 "2009-09-30T01:01:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orion\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/65b543/32.png) [@Orion\_E](https://www.ruby-forum.com/u/Orion_E)\
**Post date:** [September 30, 2009, 1:01am UTC](https://www.ruby-forum.com/t/another-0-9-1-regression/176392/1 "2009-09-30T01:01:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Orion\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/65b543/32.png) [@Orion\_E](https://www.ruby-forum.com/u/Orion_E)\
**Post date:** [September 30, 2009, 1:17am UTC](https://www.ruby-forum.com/t/another-0-9-1-regression/176392/2 "2009-09-30T01:17:07Z")

</div>

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: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Orion E.  
Sent: Tuesday, September 29, 2009 4:01 PM  
To: removed\_email\_address@domain.invalid  
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: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 ?

---

<div class="post-metadata">

**Author:** ![Orion\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/65b543/32.png) [@Orion\_E](https://www.ruby-forum.com/u/Orion_E)\
**Post date:** [September 30, 2009, 1:32am UTC](https://www.ruby-forum.com/t/another-0-9-1-regression/176392/3 "2009-09-30T01:32:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Orion\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/65b543/32.png) [@Orion\_E](https://www.ruby-forum.com/u/Orion_E)\
**Post date:** [September 30, 2009, 2:59am UTC](https://www.ruby-forum.com/t/another-0-9-1-regression/176392/4 "2009-09-30T02:59:34Z")

</div>

I’ve filed bug

[http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2609](http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2609)

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Orion E.  
Sent: Tuesday, September 29, 2009 4:01 PM  
To: removed\_email\_address@domain.invalid  
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: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 ?
