# Re: Code Review: bugfixes-7

**URL:** <https://www.ruby-forum.com/t/re-code-review-bugfixes-7/137114>\
**Category:** IronRuby\
**Created:** [May 9, 2008, 1:43am UTC](https://www.ruby-forum.com/t/re-code-review-bugfixes-7/137114 "2008-05-09T01:43:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksunair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b19c9b/32.png) [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Post date:** [May 9, 2008, 1:43am UTC](https://www.ruby-forum.com/t/re-code-review-bugfixes-7/137114/1 "2008-05-09T01:43:52Z")

</div>

Hi john,

I implemented both basename and file as well. But I will build a patch  
without those two in it after getting your update.

Thanks.

On May 8, 2008, at 3:37 PM, “John L. (IRONRUBY)” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

tfpt review /shelveset:bugfixes-7;REDMOND\jflam

Ruby only

This shelveset fixes a number of open bugs on Rubyforge and adds some  
features that we need to get the latest rubinius specs running.

MatchDataOps:

- 

```
  we used to alias MatchData to 

```

System.Text.RegularExpressions.Match. However, to fully implement  
MatchData we need to also hold onto a reference to the original string  
that we matched against. A new MatchData type was created (MatchData.cs)  
which wraps the existing .NET Match object. This also touches  
MutableStringOps.cs, RubyOps.cs, RubyScope.cs,  
SpecialGlobalVariableInfo.cs

- 

```
  finished implementing all methods. 16 out of 16 specs pass

```

- 

```
  implemented to_a which closes bug #19903

```

RegexpOps:

- 

```
  added ctor overload to close bug #19927

```

- 

```
  made some changes to return MatchData objects instead of Match 

```

objects

- 

```
  made some changes to return boxed integers via 

```

RuntimeHelpers.Int32ToObject() instead of explicit boxing. This also  
touches MutableStringOps.cs

TimeOps:

- 

```
  removed overloaded constructors to close bug #19956. But this 

```

exposes a new problem about Type aliasing that is described by bug 20035  
(referencing a System::DateTime explicitly does not allow you to call  
the .NET constructors - only the Ruby-defined constructors).

- 

```
  fixed Time#- bug - #19955

```

ModuleOps:

- 

```
  fixed some very old bugs #15996, #15995 related to including 

```

non-sensible things (include 1, include nil). RequireNonClasses() method  
now throws the correct Ruby exceptions. This also touches  
SingletonOps.cs

MutableStringOps:

- 

```
  added an implementation of String#rindex which closes #19904. We 

```

pass all specs except for 4 which fail because of differences between  
.NET regex and Ruby regex.

Dir.cs:

- 

```
  cleaned up some code here, was about to work on glob 

```

implementation (bugs #19843 #19950, but handed off to Curt)

FileOps.cs:

- 

```
  added an implementation of File#basename which closes #19905. 

```

passes all specs except for one which is wrong, and one which is  
unix-specific. These things are likely bugs in Ruby.

#File.basename(‘baz.rb’, ‘z.rb’).should == ‘ba’ – bad test  
#File.basename(“bar.txt.exe”, “.txt.exe”).should == “bar” -  
unix-only, should be wrapped in platform

- 

```
  added an implementation of File.file? to close #19949

```

MutableString.cs:

- 

```
  added a static Empty MutableString

```

- 

```
  added delegation thunks to LastIndexOf()

```

- 

```
  fixed our Equals() implementation to correctly distinguish 

```

between different types of strings (CLR vs. MutableString)

File.cs:

- 

```
  fixes a bug related to what "w+" means in .NET. - its 

```

FileMode.OpenOrCreate

Thanks,  
-John

\<bugfixes-7.diff\>

* * *

Ironruby-core mailing list  
removed\_email\_address@domain.invalid  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)
