IronRuby hosting - executing C# method

Hi,
I have some issue with hosting IronRuby in C# application.

I’ve created Ruby ScriptEngine, created ScriptScope with delegate in it:

C#
scope.SetVariable(“func”, new Action(MyMethod));

but can’t execute “func” from script

Ruby
func(“argument”)
fails with ArgumentException “wrong number of arguments (1 for 0)”

but can run it by calling “invoke”:

Ruby
func.invoke(“argument”)

is it possible to execute Delegate like normal ruby function?


Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Orion E. wrote in post #1085558:


Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

???

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