Forum: IronRuby Code Review: RubyClrInterop06

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Curt H. (Guest)
on 2008-11-25 01:23
(Received via mailing list)
Attachment: RubyClrInterop06.diff (0 Bytes)
tfpt review "/shelveset:RubyClrInterop06;REDMOND\curth"
Comment  :
Create constructors on generated types that match each base class
Allocator logic not yet updated to use new constructors
Tomas M. (Guest)
on 2008-11-25 02:04
(Received via mailing list)
In DefineConstructors, newParams seems to be unnecessarily copied.
Wouldn't it be better to do:

Type[] newParams;
Type[] baseParams = baseCtor.GetParameters();

if (has ruby class) {
  newParams = baseParams;
} if (is serializer) {
  newParams = baseParams;
} else {
  newPrams = ArrayUtils.Insert(typeof(RubyClass), baseParams);


I would also split this method to multiple pieces, seems too big

Other than that, looks good!

Curt H. (Guest)
on 2008-11-25 03:47
(Received via mailing list)
Unfortunately, GetParameters() doesn't return a type array -- it returns
a ParameterInfo array.  Here we see the evil of "var" -- it hides the
actual type :).

I'll look for opportunities to split the method;
Tomas M. (Guest)
on 2008-11-25 03:54
(Received via mailing list)
Alright then :)
This topic is locked and can not be replied to.