From lists at ruby-forum.com Thu Nov 15 00:01:10 2012 From: lists at ruby-forum.com (Josh Gough) Date: Thu, 15 Nov 2012 01:01:10 +0100 Subject: [Ironruby-core] Problems with 1.1.3 In-Reply-To: <1344202202.85903.YahooMailNeo@web161303.mail.bf1.yahoo.com> References: <1344202202.85903.YahooMailNeo@web161303.mail.bf1.yahoo.com> Message-ID: <211594004e13c0d6c739545d7d3fff79@ruby-forum.com> I am getting the same issue, but I installed IronRuby from the NuGet package. I'm attempting to upgrade the code from this: http://blogs.msdn.com/b/nblumhardt/archive/2008/12/09/hosting-ruby-parts-in-mef.aspx I had gotten everything to compile and it got past initial engine load and assembly loading, but then I get that same message: Method not found: 'Microsoft.Scripting.Actions.Calls.OverloadInfo[] Microsoft.Scripting.Actions.Calls.ReflectionOverloadInfo.CreateArray(System.Reflection.MemberInfo[])'. Any other thoughts what it could be? The versions of those dlls mentioned above: IronRuby, IronRuby.Libraries : 1.1.3.0 Microsoft.Dynamic, Scripting, and MetaData: 1.1.0.20 Thank you, Josh -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Nov 20 20:25:00 2012 From: lists at ruby-forum.com (Konstantin Kos) Date: Tue, 20 Nov 2012 21:25:00 +0100 Subject: [Ironruby-core] IronRuby hosting - executing C# method Message-ID: <7f3eee4d55d974777f6e291c1b6854a2@ruby-forum.com> 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? -- Posted via http://www.ruby-forum.com/. From Orion.Edwards at gallagher.co Tue Nov 20 20:34:44 2012 From: Orion.Edwards at gallagher.co (Orion Edwards) Date: Wed, 21 Nov 2012 09:34:44 +1300 Subject: [Ironruby-core] IronRuby hosting - executing C# method In-Reply-To: <7f3eee4d55d974777f6e291c1b6854a2@ruby-forum.com> References: <7f3eee4d55d974777f6e291c1b6854a2@ruby-forum.com> Message-ID: No, even in pure ruby code you must use .call to execute a function stored in a variable eg: f = lambda{ |x| puts x } f.call(5) # cannot simply use f(5) This is a side effect of ruby's syntax which allows you to call methods without brackets surrounding the arguments ______________________________________________________ Orion Edwards | Technical Leader PHONE +64 7 838 9800 | FAX +64 7 838 9801 | EMAIL orion.edwards at gallagher.co | WEB www.gallagher.co From: Konstantin Kos To: ironruby-core at rubyforge.org Date: 21/11/2012 09:25 a.m. Subject: [Ironruby-core] IronRuby hosting - executing C# method Sent by: ironruby-core-bounces at rubyforge.org 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? -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ########################################################################### This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. ########################################################################### -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 3465 bytes Desc: not available URL: From lists at ruby-forum.com Wed Nov 21 10:57:23 2012 From: lists at ruby-forum.com (Konstantin Kos) Date: Wed, 21 Nov 2012 11:57:23 +0100 Subject: [Ironruby-core] IronRuby hosting - executing C# method In-Reply-To: References: <7f3eee4d55d974777f6e291c1b6854a2@ruby-forum.com> Message-ID: <62f06c60aeac91872fb02b284c5b093d@ruby-forum.com> Orion Edwards wrote in post #1085558: > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core ??? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Nov 29 16:21:21 2012 From: lists at ruby-forum.com (j.barrett s.) Date: Thu, 29 Nov 2012 17:21:21 +0100 Subject: [Ironruby-core] Problems with 1.1.3 In-Reply-To: <1344202202.85903.YahooMailNeo@web161303.mail.bf1.yahoo.com> References: <1344202202.85903.YahooMailNeo@web161303.mail.bf1.yahoo.com> Message-ID: Encountering the same issue here. I have references to : IronRuby.dll, IronRuby.Libraries.dll, Microsoft.Scripting.dll, Microsoft.Scripting.Metadata, Microsoft.Dynamic.dll. The top of my stack looks like : MissingMethodException: Method not found: 'Microsoft.Scripting.Actions.Calls.OverloadInfo[] Microsoft.Scripting.Actions.Calls.ReflectionOverloadInfo.CreateArray(System.Reflection.MemberInfo[])'.] IronRuby.Builtins.RubyClass.GetConstructors(Type type) +0 IronRuby.Builtins.RubyClass.BuildObjectConstructionNoFlow(MetaObjectBuilder metaBuilder, CallArguments args, String methodName) +1862 IronRuby.Builtins.RubyClass.BuildObjectConstruction(MetaObjectBuilder metaBuilder, CallArguments args, String methodName) +43 IronRuby.Runtime.Calls.RuleGenerators.InstanceConstructor(MetaObjectBuilder metaBuilder, CallArguments args, String name) +109 IronRuby.Runtime.Calls.RubyCustomMethodInfo.BuildCallNoFlow(MetaObjectBuilder metaBuilder, CallArguments args, String name) +59 IronRuby.Runtime.Calls.RubyMemberInfo.BuildCall(MetaObjectBuilder metaBuilder, CallArguments args, String name) +45 IronRuby.Runtime.Calls.RubyCallAction.BuildCall(MetaObjectBuilder metaBuilder, String methodName, CallArguments args, Boolean defaultFallback, Boolean callClrMethods) +422 -- Posted via http://www.ruby-forum.com/.