Method parameter modifiers: out and ref

I am trying to work with a .NET lib that uses ref modifiers on some
method
params and am not sure how to work with them from Ruby. I know with out
modifiers that those parameters become part of the return values, but
what
can I do with ref parameters from Ruby?

James Thompson
Plain Programs
New Orleans, LA

P: (502) 619.0353
E: [email protected]
W: www.plainprograms.com

They are just like out parameters that have input value as well.

public class C {
public int foo(ref int bar) { bar++; return 3; }
}

p C.new.foo(1) # => [3, 2]

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of James Thompson
Sent: Friday, October 16, 2009 1:14 PM
To: [email protected]
Subject: [Ironruby-core] Method parameter modifiers: out and ref

I am trying to work with a .NET lib that uses ref modifiers on some
method params and am not sure how to work with them from Ruby. I know
with out modifiers that those parameters become part of the return
values, but what can I do with ref parameters from Ruby?

James Thompson
Plain Programs
New Orleans, LA

P: (502) 619.0353
E: [email protected]mailto:[email protected]
W: www.plainprograms.comhttp://www.plainprograms.com

look here:
http://rubyforge.org/pipermail/ironruby-core/2009-June/004731.html

Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)