Permalink
Browse files

Fixed Resource::OPT_SUFFIX_REGEXP.

Group 1 should have been non-greedy.
  • Loading branch information...
1 parent 2ac758c commit 17473ea4ebabfab910d2048ffb04a2dfc3edb41d @jacius committed Jan 10, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/resource.rb
View
@@ -46,7 +46,7 @@ class Resource
SUFFIX_REGEXP = /(.*)(-(?:im|cm|mm|c|m))(\.yaml)?$/
# Same as SUFFIX_REGEXP, but the type suffix is optional.
- OPT_SUFFIX_REGEXP = /(.*)(-(?:im|cm|mm|c|m))?(\.yaml)?$/
+ OPT_SUFFIX_REGEXP = /(.*?)(-(?:im|cm|mm|c|m))?(\.yaml)?$/
# Takes a resource ID with no type, and returns all existing

0 comments on commit 17473ea

Please sign in to comment.