Index: src/ironruby/Compiler/Generation/RubyTypeBuilder.cs =================================================================== --- src/ironruby/Compiler/Generation/RubyTypeBuilder.cs (revision 42) +++ src/ironruby/Compiler/Generation/RubyTypeBuilder.cs (working copy) @@ -57,7 +57,7 @@ Type clrType = typeGen.FinishType(); - RubyClass cls = new RubyClass(executionContext, name, clrType, null, superClass, false, false); + RubyClass cls = new RubyClass(executionContext, name, clrType, null, superClass, false, superClass.ShowUnderlyingTypeMembers); // set the static type field FieldInfo rubyClassField = clrType.GetField(".RubyClass"); Index: src/ironruby/Runtime/RubyExecutionContext.cs =================================================================== --- src/ironruby/Runtime/RubyExecutionContext.cs (revision 42) +++ src/ironruby/Runtime/RubyExecutionContext.cs (working copy) @@ -25,6 +25,7 @@ using Ruby.Compiler; using Ruby.Compiler.Generation; using Ruby.Hosting; +using Microsoft.Scripting.Actions; namespace Ruby.Runtime { @@ -257,6 +258,12 @@ return GetOrCreateClass(type); } + // TODO: remove when we have automatic TypeTracker => RubyClass conversions + TypeTracker tracker = obj as TypeTracker; + if (tracker != null) { + return GetOrCreateClass(tracker.Type); + } + return null; } Index: tests/ironruby/Interop/test_basic.rb =================================================================== --- tests/ironruby/Interop/test_basic.rb (revision 42) +++ tests/ironruby/Interop/test_basic.rb (working copy) @@ -67,8 +67,25 @@ assert_equal(Dict.new.to_string, 'System.Collections.Generic.Dictionary`2[System.String,System.String]'.to_clr_string) end +def test_inherit + # TODO: more interesting tests when more features of .NET interop are working + class Bob < System::Collections::ArrayList + def foo + count + end + end + + a = Bob.new + a.add 1 + a.Add 2 + a.add 3 + assert_equal(a.foo, 3) + assert_equal(a.Count, 3) +end + test_event #test_field test_string test_stringbuilder test_generictypes +test_inherit