opal/opal — pull request #591 by wmnnd (2014-09-15 12:57:52+00:00)
Title: Use XRegExp in order to support free-spacing mode and named captures

This is my attempt to have Opal use XRegExp for all Regexps.
Please note that I have *not* included XRegExp in the Runtime because I was not sure about how that should be done.
This implementation works with the current development version of XRegExp 3.0. https://raw.githubusercontent.com/slevithan/xregexp/master/src/xregexp.js

In addition I also added the missing #options and #casefold? functions.

The new constructor for Regexp also provides support for passing flags when creating a Regexp which was previously not supported.