Regexp.new overload

From: Wayne K. [[email protected]]
Sent: Friday, 16 May 2008 3:33 PM
To: [email protected]
Subject: Re: [Ironruby-core] IronRuby r109 is out

The rest fail for the following reasons:
13 - Regexp.new overloads not implemented

The missing overload for Regexp.new is the one that takes two string
parameters, the second parameter represents the options and need not be
an integer, if the options is not false then the regexp will be case
insensitive.

The required patch is something like:

[RubyConstructor]
public static RubyRegex/!/ Create([NotNull]MutableString/!/ str,
object options) {
return new RubyRegex(str,
RubyRegex.ToClrOptions(Protocols.IsTrue(options) ?
RegExOptions.IGNORECASE : RegExOptions.NONE));
}

Cheers, Wayne.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs