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 Schementi <
jimmy.scheme...@microsoft.com> wrote:

> 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:* ironruby-core-boun...@rubyforge.org [mailto:
> ironruby-core-boun...@rubyforge.org] *On Behalf Of *Orion Edwards
> *Sent:* Tuesday, September 29, 2009 4:01 PM
> *To:* ironruby-core@rubyforge.org
> *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 ?
>
>
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core@rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to