Place breakpoint in file SuperCallAction.cs after the call to

method = targetClass.ResolveSuperMethodNoLock(currentMethodName, 
currentDeclaringModule).InvalidateSitesOnOverride().Info;

this finds the method. You can see that it is a RubyLibraryMethodInfo (i.e. a 
Ruby method defined in C# library) and has two overloads (MethodBases property)
{IronRuby.Builtins.RubyIO Reinitialize(IronRuby.Builtins.RubyIO, Int32, 
IronRuby.Builtins.MutableString)}
{IronRuby.Builtins.RubyIO Reinitialize(IronRuby.Builtins.RubyIO, Int32, Int32)}

This method is defined in IOOps and expects the first argument to be a file 
descriptor. 
If we look at File's private instance methods in MRI we see:

irb(main):004:0> File.private_instance_methods(false).sort
=> ["initialize"]

While in IronRuby we get a different result:

>>> File.private_instance_methods(false).sort
=> ["blockdev?", "chardev?", "directory?", "executable?", "executable_real?", 
"exist?", "exists?", "file?", "grpowned?",
 "identical?", "owned?", "pipe?", "readable?", "readable_real?", "setgid?", 
"setuid?", "size", "size?", "socket?", "stic
ky?", "symlink?", "writable?", "writable_real?", "zero?"]

This means there are two bugs:
1) initialize is missing from File
2) bunch of private methods shouldn't be there

Have a fix almost ready.

Tomas

-----Original Message-----
From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Charles Strahan
Sent: Saturday, July 31, 2010 3:35 PM
To: ironruby-core@rubyforge.org
Subject: [Ironruby-core] Can't subclass IronRuby libraries ("super" doesn't 
resolve correctly)

I could use some help with Issue #4957
(http://ironruby.codeplex.com/workitem/4957).

Does anyone know where super class ctors are resolved?  I haven't been able to 
spot where they are resolved in the code.

-Charles
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to