Issue #8651 has been updated by sakuro (Sakuro OZAWA).



drbrain (Eric Hodel) wrote:

 $[ is not a valid global variable you get an exception.
 
do you mean $], not $[ ?

----------------------------------------
Bug #8651: /[#$]/ causes syntax error
https://bugs.ruby-lang.org/issues/8651#change-40780

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/