Project

General

Profile

Actions

Bug #8651

closed

/[#$]/ causes syntax error

Added by sakuro (Sakuro OZAWA) almost 11 years ago. Updated almost 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0]
[ruby-core:56069]

Description

=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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0