# Code Review: Copy4

**URL:** <https://www.ruby-forum.com/t/code-review-copy4/150666>\
**Category:** IronRuby\
**Created:** [October 11, 2008, 3:44am UTC](https://www.ruby-forum.com/t/code-review-copy4/150666 "2008-10-11T03:44:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![grujildo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Post date:** [October 11, 2008, 3:44am UTC](https://www.ruby-forum.com/t/code-review-copy4/150666/1 "2008-10-11T03:44:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![grujildo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Post date:** [October 13, 2008, 5:18am UTC](https://www.ruby-forum.com/t/code-review-copy4/150666/2 "2008-10-13T05:18:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![grujildo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Post date:** [October 13, 2008, 5:28am UTC](https://www.ruby-forum.com/t/code-review-copy4/150666/3 "2008-10-13T05:28:59Z")

</div>

Sorry about the premature send. I blame the keyboard. 😉

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.

---

<div class="post-metadata">

**Author:** ![grujildo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Post date:** [October 13, 2008, 7:36pm UTC](https://www.ruby-forum.com/t/code-review-copy4/150666/4 "2008-10-13T19:36:42Z")

</div>

2,3,4) fixed.

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