# Code Review: Various5

**URL:** <https://www.ruby-forum.com/t/code-review-various5/137653>\
**Category:** IronRuby\
**Created:** [May 15, 2008, 12:49am UTC](https://www.ruby-forum.com/t/code-review-various5/137653 "2008-05-15T00:49:16Z")\
**Posts on this page:** 1\
**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:** [May 15, 2008, 12:49am UTC](https://www.ruby-forum.com/t/code-review-various5/137653/1 "2008-05-15T00:49:16Z")

</div>

tfpt review /shelveset:Various5;REDMOND\tomat

Reviewed F2F by Dino and John.

- 

```
     Implements $KCODE global variable.

```

- 

```
     Implements ToString() and ToByteArray() methods on 

```

MutableString - they create a copy of the content converted to  
System.String or byte[] preserving the content representation.

- 

```
     Fixes bug #19309: double should be parsed using an invariant 

```

culture

- 

```
     Fixes bug #19867: $0 and $: not initialized correctly - 

```

initializes $0.

- 

```
     Fixes bug #15982: re-opening the class &quot;Class&quot; need 

```

update version?

- 

```
    Incorrect tests were emitted when dispatching on 

```

modules/classes

- 

```
     Makes method dispatch multi-runtime safe (the missing check 

```

caused sharing of the rule across runtimes)

- 

```
     Improves and fixes bugs in MutableString construction from 

```

literals and by concatenation of embedded expressions (“foo #{x} bar”):

- 

```
    to_s string conversion protocol needs to be applied

```

- 

```
    "#{x}" was broken - to_s wasn't called on x

```

- 

```
    Optimizes concatenation:

```

- 

```
    Where possible the compiler performs the concatenation (like x 

```

= “foo” “bar”).

- 

```
    Special-cases concatenation helpers for all combinations of at 

```

most two literal and variable arguments.

- 

```
    Some more optimizations are still possible.

```

- 

```
     Implements Regex#to_s, Regex#inspect, Regex#options

```

- 

```
    Fixes bug #19756: Regular expression substitution

```

- 

```
     Changes instantiation of Ruby classes defined in libraries

```

- 

```
    C.new doesn't invoke "initialize" method anymore if C is a 

```

library class.

- 

```
    "initialize" can therefore be invoked only via send, from 

```

subclasses (directly or using super) and when instantiating a subclass  
that has no “initialize” method. In these cases the call is  
reinitializing an existing object.

- 

```
     Fixes one of the Array#initialize overloads

```

- 

```
    This didn't work previously: Array.new(class C; def to_int; 5; 

```

end; self; end.new) { ‘foo’ }

- 

```
     Implements parameterless Proc#new

```

- 

```
    This overload searches the lexical scope chain for a method 

```

scope and picks its block parameter.

- 

```
     Fixes #19805: Wrong number of type of arguments for Class

```

- 

```
    Implements Class constructor that creates an anonymous class

```

- 

```
     Fixes #19953: class_eval adds methods to the wrong class

```

- 

```
     Fixes EqualityComparer: it shouldn't call 'eql?' if the 

```

values being compared are reference-equal.

- 

```
     Refactors Struct#new and fixes some issues there.

```

- 

```
     Fixes some specs.

```

Tomas
