mruby/mruby — pull request #1038 by kouki-o-iij (2013-03-21 08:43:44+00:00)
Title: bugfix escape charactor for Regexp class

escape character type would have been limited current mruby.
(Ex: '\ t' isn't escaped.)

## Code and execution environment are as follows:

* environment(add regexp gem to build_config.rb)
```
# Use Regexp class
conf.gem :git => 'git@github.com:masamitsu-murase/mruby-hs-regexp.git'
```

* sample code(literal.rb):
```
p (/a\nb/ =~ "a\nb") # => 0
p (/a
b/ =~ "a\nb") # => 0
p (%r!a\tb! =~ "a\tb") # => 0
p (/a\\tb/ =~ "a\\tb") # => 0
```

* ruby
```
$ ruby -v
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-linux]
$ ruby literal.rb
0 # => OK
0 # => OK
0 # => OK
0 # => OK
```

* before(current mruby/mruby)
```
$ ./bin/mruby literal.rb
0 # => OK
0 # => OK
0 # => OK
nil # => NG
```

* after(pr-regexp-escape)
```
$ ./bin/mruby literal.rb
0 # => OK
0 # => OK
0 # => OK
0 # => OK
```