`(eval):1: failed to compile regex: empty (sub)expression` when running `rvm reinstall ruby-head`

Fork from #2273 

---

When I run `rvm reinstall ruby-head`, I saw a lot of warnings about regex. Here's the debug version:

```
$ rvm --debug reinstall ruby-head
ruby-head - reinstall
Log prefix: /Users/sikachu/.rvm/log/1381452020_ruby-head/
Log filesystem: local,
Log max name length: 250
Log file: /Users/sikachu/.rvm/log/1381452020_ruby-head/remove.src.log
[2013-10-10 20:40:20] __rvm_rm_rf
__rvm_rm_rf () {
	__rvm_rm_rf_verbose "$@"
}
current path: /Users/sikachu
command(2): __rvm_rm_rf /Users/sikachu/.rvm/src/ruby-head
Removing /Users/sikachu/.rvm/src/ruby-head - using Zsh, can not show progress, be patient...
/Users/sikachu/.rvm/rubies/ruby-head has already been removed.
__rvm_setup_compile_environment_setup ruby-head
rvm_autolibs_flag=4
__rvm_setup_compile_environment_movable_early ruby-head
__rvm_setup_compile_environment_requirements ruby-head
Checking requirements for osx.
requirements code for osx loaded
brew seems to be writable
(eval):1: failed to compile regex: empty (sub)expression
(eval):1: failed to compile regex: empty (sub)expression
(eval):1: failed to compile regex: empty (sub)expression
(eval):1: failed to compile regex: empty (sub)expression
(eval):1: failed to compile regex: empty (sub)expression
(eval):1: failed to compile regex: empty (sub)expression
(eval):1: failed to compile regex: empty (sub)expression
(eval):1: failed to compile regex: empty (sub)expression
Found required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libksba, openssl.
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/sikachu/.rvm/gems/ruby-2.0.0-p247/bin:/Users/sikachu/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/sikachu/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/sikachu/.rvm/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/libyaml )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/readline )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/libksba )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/openssl )
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
__rvm_setup_compile_environment_movable ruby-head
__rvm_setup_compile_environment_osx_compiler ruby-head
__rvm_setup_compile_environment_architectures ruby-head
rvm_architectures(0):.
__rvm_setup_compile_environment_gcc47plus ruby-head
__rvm_setup_compile_environment_bison ruby-head
__rvm_setup_compile_environment_smartos ruby-head
__rvm_setup_compile_environment_openindiana ruby-head
__rvm_setup_compile_environment_sunos ruby-head
__rvm_setup_compile_environment_openbsd ruby-head
__rvm_setup_compile_environment_auto_conf_make ruby-head
__rvm_setup_compile_environment_flags_docs ruby-head
__rvm_setup_compile_environment_flags_tcltk ruby-head
__rvm_setup_compile_environment_flags_shared_static ruby-head
__rvm_setup_compile_environment_flags_threads ruby-head
__rvm_setup_compile_environment_compatibility_flag ruby-head
found compiler: /usr/bin/clang
Installing Ruby from source to: /Users/sikachu/.rvm/rubies/ruby-head, this may take a while depending on your cpu(s)...
HEAD is now at 12a5525 vm_trace.c: use macro
From git://github.com/ruby/ruby
 * branch            trunk      -> FETCH_HEAD
Already up-to-date.
Copying from repo to src path...
... snip ...
```

Funny enough, if I run `rvm --debug requirements`, the warning isn't there.

```
$ rvm --debug requirements
rvm_autolibs_flag=4
Checking requirements for osx.
requirements code for osx loaded
brew seems to be writable
Found required packages: apple-gcc42, autoconf, automake, libtool, pkg-config, libyaml, readline, libksba, openssl.
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/sikachu/.rvm/gems/ruby-2.0.0-p247/bin:/Users/sikachu/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/sikachu/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/sikachu/.rvm/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin
__rvm_update_configure_env(1):CFLAGS=-I/usr/local/opt/libyaml/include:
__rvm_update_configure_env(1):LDFLAGS=-L/usr/local/opt/libyaml/lib:
__rvm_update_configure_env(1):CFLAGS=-I/usr/local/opt/readline/include:
__rvm_update_configure_env(1):LDFLAGS=-L/usr/local/opt/readline/lib:
__rvm_update_configure_env(1):CFLAGS=-I/usr/local/opt/libksba/include:
__rvm_update_configure_env(1):LDFLAGS=-L/usr/local/opt/libksba/lib:
__rvm_update_configure_env(1):CFLAGS=-I/usr/local/opt/openssl/include:
__rvm_update_configure_env(1):LDFLAGS=-L/usr/local/opt/openssl/lib:
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
__rvm_rm_rf already gone: /Users/sikachu/.rvm/tmp/57959*
```