Permalink
Browse files

Escape forward slashes in character class literals

  • Loading branch information...
1 parent 9f178b5 commit ed08be62759b9be369cf391bd3cde8336d82ce1d @mjackson committed Feb 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/citrus/file.rb
View
@@ -220,7 +220,7 @@ def flags
rule :character_class do
all(/\[(?:\\?.)*?\]/, :space) {
- eval("/#{first.to_s}/")
+ eval("/#{first.to_s.gsub('/', '\\/')}/")
}
end

0 comments on commit ed08be6

Please sign in to comment.