I think we actually already have this reported on CodePlex:

http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2490

Tomas

From: [email protected] 
[mailto:[email protected]] On Behalf Of Orion Edwards
Sent: Tuesday, September 29, 2009 4:52 PM
To: [email protected]
Subject: Re: [Ironruby-core] 0.9.1 regression when creating System::Array of 
clr enum values


On Wed, Sep 30, 2009 at 12:19 PM, Jimmy Schementi 
<[email protected]<mailto:[email protected]>> wrote:

The error message seems to indicate this is the same issue you had in your 
"Another 0.9.1 regression" mail.


Really? The repro for this one is really simple and has no COM at all.

C# code:

public enum Fields
{
    None = 0,
    DBID = 1,
    Name = 2
}

Ruby code

require 'scratchdll'
f = [Fields.DBID, Fields.Name]
System::Array[Fields].new f

=>
System::InvalidCastException: The result type 'System.Int32' of the dynamic 
binding produced by binder 'ConvertToFixnumA
ction @1' is not compatible with the result type 'Fields' expected by the call 
site.
        from Microsoft.Scripting.Core:0:in `Bind'
        from Microsoft.Scripting.Core:0:in `BindCore'

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

Reply via email to