serverspec/serverspec — pull request #227 by ryotarai (2013-08-09 00:20:30+00:00)
Title: Fix a bug in contain matcher with regexp.

`Regexp#to_s` behaves like the following:
```
[1] pry(main)> /^hello$/.to_s
=> "(?-mix:^hello$)"
```

`-mix` means disabling `m`, `i` and `x` options.
To use these options, we should use `grep -P` (perl regexp) instead of `grep`.
But `grep -P` is highly experimental and `grep -P` may warn of unimplemented features.

So I use `Regexp#source` instead of `Regexp#to_s`.
`Regexp#source` behaves like the following:
```
[2] pry(main)> /^hello$/.source
=> "^hello$"
```