[Ironruby-core] super(foo) doesn't work correctly when subclassing Ruby classes implemented in C#

Charles Strahan charles.c.strahan at gmail.com
Thu Jul 29 02:03:54 EDT 2010

I've found an odd bug.  I think this is Tomas' territory, but I could be
wrong.  I've already opened an issue on codeplex (
http://ironruby.codeplex.com/workitem/4957), but I figured I'd mention it
here to generate some discussion.

First, here's a quick repro of the bug:

class File2 < File
  def initialize

# TypeError: can't convert String into Fixnum

What's going on here?  Well, it looks like IronRuby has arbitrarily picked a
constructor overload to use when it finds a call to super.  If I instead put
"super(1)", it would work just fine.  This same problem seems to plague any
RubyClass that was implemented in C# using the IronRuby library APIs.

Could someone give me a sanity check, please?  You'll notice that the code
snippet above works just fine on MRI, so I don't think I've lost my marbles
just yet :).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100729/d0a5b2f8/attachment.html>

More information about the Ironruby-core mailing list