Works great now. Thanks for the fast response! From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday, March 03, 2010 2:53 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Consuming DynamicObjects in IronRuby
K, I've pushed. I guarantee it builds, but I pushed it before all the tests finished since I have reasonable confidence in them. Looks good so far. I'll re-push tomorrow if needed. JD From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Jim Deville Sent: Tuesday, March 02, 2010 7:53 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Consuming DynamicObjects in IronRuby Yeah, between being sick and test changes, I haven't pushed in a while. I'll do a push tonight and make sure the simple repro passes and ends up as a test. ________________________________ From: Tomas Matousek <tomas.matou...@microsoft.com> Sent: Tuesday, March 02, 2010 7:47 PM To: ironruby-core@rubyforge.org <ironruby-core@rubyforge.org> Subject: Re: [Ironruby-core] Consuming DynamicObjects in IronRuby This works for me, so I guess the fix just isn't on GIT yet. Tomas From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Robert Walker Sent: Tuesday, March 02, 2010 6:52 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Consuming DynamicObjects in IronRuby A simple case appears to reproduce the problem: using System; namespace DynamicTest { public class N : System.Dynamic.DynamicObject { public N() { } public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out Object result) { if (binder.Name == "Zot") { result = "hello world"; return true; } return base.TryGetMember(binder, out result); } } } And then ... $LOAD_PATH << "D:\\Projects\\DynamicTest\\DynamicTest\\bin\\Debug" require "DynamicTest.dll" z =DynamicTest::N.new z.Zot >>> z.Zot System.Core:0:in `BindCore': unbound variable: Param_0 (TypeError) from (ir):1 --- Rob From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, March 02, 2010 6:00 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Consuming DynamicObjects in IronRuby It is a bug in DynamicObject for which I implemented a workaround in IronRuby some time ago. So the build from latest sources should help. Tomas From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Jim Deville Sent: Tuesday, March 02, 2010 2:05 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Consuming DynamicObjects in IronRuby Have you tried building Ruby directly? Get the sources from Github, then, from the command line, run c:\path\to\merlin\main\languages\ruby\scripts\dev.bat rb devenv ruby4.sln Inside of VS build ruby4.sln then: 1) For basic testing, rbd will open a prompt for you to resume testing. 2) For using it then without the sources, rake package will generate the release layout at c:\ironruby, which you can then copy to your desired location. After 1.0, I'm going to look into making nightly drops available, but that's a little ways off. If this still doesn't work, it might be a bug :( JD From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Robert Walker Sent: Tuesday, March 02, 2010 1:22 PM To: ironruby-core@rubyforge.org Subject: [Ironruby-core] Consuming DynamicObjects in IronRuby (All work done with VS2010 RC and matching IronRuby build (v0.9.40, 07-Feb-10)). I have a C# assembly that implements a dynamic object. When I try to use this object from Ruby I get the error: >>> r.StdUnitCost System.Core:0:in `BindCore': unbound variable: Param_0 (TypeError) from (ir):1 This usage works fine from a test C# 4.0 app using the 'dynamic' keyword. I suspect that the issue is related to the version of the DLR in use -- there are a number of 'InvalidOperationExceptions' being thrown from the Microsoft.Dynamic.dll and I believe this is no longer a shipping assembly with .NET 4? Is there a (simple) work around for this? Thanks, Rob Walker Senior Software Architect [cid:image001.gif@01CABAB3.AD320810]<http://www.kinaxis.com/> http://www.kinaxis.com Kinaxis 700 Silver Seven Road Ottawa, ON, Canada K2V 1C3 Office: +1 613.592.5780 ext. 5282 Fax: +1 613.592.0584
<<inline: image001.gif>>
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core