Skip to content

Commit

Permalink
Merge pull request #55 from robg/fix_parser_regex
Browse files Browse the repository at this point in the history
Escape curly brace in gsub regexp for #each_with_prefix
  • Loading branch information
pat committed Jan 3, 2013
2 parents bf534cf + c73d44a commit 0bb40ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/riddle/configuration/parser.rb
Expand Up @@ -59,7 +59,7 @@ def sources

def each_with_prefix(prefix)
inner.keys.select { |key| key[/^#{prefix}\s+/] }.each do |key|
yield key.gsub(/^#{prefix}\s+/, '').gsub(/\s*{$/, ''), inner[key]
yield key.gsub(/^#{prefix}\s+/, '').gsub(/\s*\{$/, ''), inner[key]
end
end

Expand Down

0 comments on commit 0bb40ef

Please sign in to comment.