From: "sakuro (Sakuro OZAWA)" Date: 2013-07-18T11:30:35+09:00 Subject: [ruby-core:56069] [ruby-trunk - Bug #8651][Open] /[#$]/ causes syntax error Issue #8651 has been reported by sakuro (Sakuro OZAWA). ---------------------------------------- Bug #8651: /[#$]/ causes syntax error https://bugs.ruby-lang.org/issues/8651 Author: sakuro (Sakuro OZAWA) Status: Open 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/