# \[patch\] Fix for RubyModule.LoadNestedTypes

**URL:** <https://www.ruby-forum.com/t/patch-fix-for-rubymodule-loadnestedtypes/193441>\
**Category:** IronRuby\
**Created:** [August 17, 2010, 8:12pm UTC](https://www.ruby-forum.com/t/patch-fix-for-rubymodule-loadnestedtypes/193441 "2010-08-17T20:12:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jb\_Evain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/67e7ee/32.png) [@Jb\_Evain](https://www.ruby-forum.com/u/Jb_Evain)\
**Post date:** [August 17, 2010, 8:12pm UTC](https://www.ruby-forum.com/t/patch-fix-for-rubymodule-loadnestedtypes/193441/1 "2010-08-17T20:12:57Z")

</div>

Hey,

In the ClrGenerics3 scenario:

```
    public class ClassWithNestedGenericTypes1 {
        public class D {
        }

        public class C {
            public int Id { get { return 0; } }
        }

        public class C<T> {
            public int Id { get { return 1; } }
        }
    }

```

IronRuby currently assumes that it will find C before C`1 when  
creating the different type groups. The test fails if you simply  
invert the two C declarations:

```
    public class ClassWithNestedGenericTypes1 {
        public class D {
        }

        public class C<T> {
            public int Id { get { return 1; } }
        }

        public class C {
            public int Id { get { return 0; } }
        }
    }

```

Attached is a patch which fixes the updated test pass.

---

<div class="post-metadata">

**Author:** ![Jb\_Evain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/67e7ee/32.png) [@Jb\_Evain](https://www.ruby-forum.com/u/Jb_Evain)\
**Post date:** [August 17, 2010, 8:41pm UTC](https://www.ruby-forum.com/t/patch-fix-for-rubymodule-loadnestedtypes/193441/2 "2010-08-17T20:41:45Z")

</div>

Thanks for the patch.

Tomas
