Forum: IronRuby IronRuby hosting - executing C# method

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
24bf40dd0c16dda4bb65123937ce0c59?d=identicon&s=25 Konstantin K. (k0st1x)
on 2012-11-20 21:25
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<object>(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?
Orion Edwards (Guest)
on 2012-11-20 21:50
(Received via mailing list)
Ironruby-core mailing list
24bf40dd0c16dda4bb65123937ce0c59?d=identicon&s=25 Konstantin K. (k0st1x)
on 2012-11-21 11:57
Orion Edwards wrote in post #1085558:
> _______________________________________________
> Ironruby-core mailing list

This topic is locked and can not be replied to.