[Ironruby-core] StackOverflowException when accessing object properties

Tomas Matousek Tomas.Matousek at microsoft.com
Sat Nov 15 19:03:25 EST 2008

Isn't the class internal? (We should improve error reporting related to visibility)
Try to make it public. Public fields should be accessible in the same way properties are.


-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Benjamin van der Veen
Sent: Saturday, November 15, 2008 2:16 PM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] StackOverflowException when accessing object properties

Hello Andrew,

Andrew Peters wrote:
> I think this is because you need to reference the IronRuby.Libraries
> dll.
> Strange error I know.
> On Sat, Nov 15, 2008 at 7:33 PM, Benjamin Van der veen
> <lists at ruby-forum.com

Ah, yes, this fixed the stack overflow error. Strange indeed—thanks for
the tip! However, it's still not properly resolving the property

MissingMethodException: undefined method `text' for

I tried changing TestClass' fields to properties so that they would get
compiled as methods:

class TestClass
    public string Text { get; set; }
    public int Number { get; set; }

but no dice. Also tried capitalizing "Text". Still works with
String.Length though (whether I reference it as "my_var.length" or
"my_var.Length". Any ideas?

(Also, as somewhat of a side-note, is there a different syntax for
accessing field on CLR objects in IronRuby? Is this possible or must
they be properties?)

Thanks again,

Posted via http://www.ruby-forum.com/.
Ironruby-core mailing list
Ironruby-core at rubyforge.org

More information about the Ironruby-core mailing list