# Code Review: miscrubyfixes

**URL:** <https://www.ruby-forum.com/t/code-review-miscrubyfixes/151722>\
**Category:** IronRuby\
**Created:** [October 24, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/code-review-miscrubyfixes/151722 "2008-10-24T20:18:22Z")\
**Posts on this page:** 2\
**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 24, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/code-review-miscrubyfixes/151722/1 "2008-10-24T20:18:22Z")

</div>

tfpt review “/shelveset:miscrubyfixes;REDMOND\tomat”  
Comment :  
Implements range conditions:

- 

```
If a range whose bounds are not integer literals is used as a 

```

control flow condition (if/unless/while-loop/until-loop/?🙂 it is  
considered a ‘range condition’. It returns true/false depending on  
whether the execution state is in the range or not (the state is  
maintained in a local variable).

- 

```
Adjusts ParseTree to return flip2, flip3 nodes for range 

```

conditions.

- 

```
Removes compile time checks of range bounds - they should be 

```

evaluated at runtime.

Implements regex conditions: A regex in a condition should perform  
match against $\_.  
Converts a call to =~ method to MatchExpression if the left hand side  
is a regex expression (MRI doesn’t call =~ method in that case).

Stops using dynamic sites for Proc#call, we can easily use block  
dispatchers.

Fixes bugs:

- 

```
def f; yield; end; f {|a,b,*c| p [a,b,c] }

```

- 

```
proc{|x,| x}.call([1]).should == [1] ... This is actually 

```

inconsistent with yield in MRI. We had it consistent :-/.

- 

```
[ironruby-Bugs-21258] Can't splat to unwrap an array of 

```

exceptions.

- 

```
Symbol#inspect should quote only symbols that are not valid 

```

variable/method/operator names.

- 

```
            Fixes 'defined?' for qualified constants and 

```

methods.

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 25, 2008, 12:31am UTC](https://www.ruby-forum.com/t/code-review-miscrubyfixes/151722/2 "2008-10-25T00:31:36Z")

</div>

Looks good.
