From: "drbrain (Eric Hodel)" Date: 2013-08-02T04:46:48+09:00 Subject: [ruby-core:56310] [ruby-trunk - Bug #8651] /[#$]/ causes syntax error Issue #8651 has been updated by drbrain (Eric Hodel). Yes, I meant $], it was a typo. ---------------------------------------- Bug #8651: /[#$]/ causes syntax error https://bugs.ruby-lang.org/issues/8651#change-40804 Author: sakuro (Sakuro OZAWA) Status: Rejected Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN =begin On ruby 1.9.3-p448, a regular expression (({/[#$]/})) (character class which contains two characters, (({#})) and (({$}))) causes syntax error, unexpected $undefined. Ruby 2.0 accepts this and (({Regexp.new('[#$]')})) is OK on both versions. =end -- http://bugs.ruby-lang.org/