Code Review: Copy4

tfpt review “/shelveset:Copy4;REDMOND\tomat”

Implements initialize_copy for built-in classes.
Removes assertion in Proc, it was wrong.
Improves and fixes Kernel#send.
Implements default protocol for to_ary conversion.
Fixes super call with a block but no other arguments.

Fixes bugs:
[#20849] instance_eval within class_eval causes incorrect method
lookup.
[ ironruby-Bugs-20317 ] Kernel#instance_eval.
[ ironruby-Bugs-20705 ] instance_eval allows defining methods on all
objects
[ ironruby-Bugs-20408 ] TRUE, FALSE & NIL not defined.
[ ironruby-Bugs-21942 ] a const defined on a metaclass is not
preserved when the object is cloned

Tomas

The KernelOps._sites dictionary never

There’s at least one “#region IRubyCloneableMembers” in RubyObject.cs
which should be renamed. (There may be others.)

Some of the comments in RubyModule.Subclass.cs weren’t edited after they
were copied from MutableString.Subclass.c

Sorry about the premature send. I blame the keyboard. :wink:

Changes are good. Four comments:

  1. The KernelOps._sites dictionary never has the opportunity to have
    something removed from it; this worries me a little.
  2. There’s at least one “#region IRubyCloneableMembers” in RubyObject.cs
    which should be renamed. (There may be others.)
  3. Some of the comments in RubyModule.Subclass.cs weren’t edited after
    they were copied from MutableString.Subclass.cs.
  4. There was a trivial change to DLR outer ring that should probably
    have been copied to dlrcr.

2,3,4) fixed.

  1. Yes, it’s potential issue, however DLR doesn’t clear rule cache
    either. I’ll follow up.