Hi<br><br>Given the following (contrived) code:<br><br>namespace PersonLibrary<br>{<br> public class Person<br> {<br> public int Id { get; set; }<br> public string Name { get; set; }<br> }<br><br> public class Friend<br>
{<br><br> public Friend(Person person)<br> {<br> Person = person;<br> }<br><br> public Person Person { get; private set; }<br> }<br>}<br><br>Wouldn't you expect the following the code to output JoeSchmoe:<br>
<br>load_assembly 'PersonLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'<br><br>class MyFriend < PersonLibrary::Friend<br><br> def initialize(pers)<br> super<br> @pers = pers<br> end<br>
<br> def pers<br> @pers<br> end<br>end<br><br>person = PersonLibrary::Person.new<br><a href="http://person.name" target="_blank">person.name</a> = "JoeSchmoe"<br><a href="http://person.id" target="_blank">person.id</a> = 1<br>
<br>my_friend = MyFriend.new person<br>
puts <a href="http://my_friend.pers.name" target="_blank">my_friend.pers.name</a><br><br><br>But instead it gives me:<br>test.rb:0: allocator undefined for MyFriend (TypeError)<div><br></div><div>This happens when I call new on the class<br>
<br>Should I file a bug for that?<br><br clear="all">---<br>
Met vriendelijke groeten - Best regards - Salutations<br>Ivan Porto Carrero<br>Blog: <a href="http://flanders.co.nz" target="_blank">http://flanders.co.nz</a><br>Twitter: <a href="http://twitter.com/casualjim" target="_blank">http://twitter.com/casualjim</a><br>
Author of IronRuby in Action (<a href="http://manning.com/carrero" target="_blank">http://manning.com/carrero</a>)<br><br>
</div>