diff options
Diffstat (limited to 'lib/expand_variables.rb')
-rw-r--r-- | lib/expand_variables.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/expand_variables.rb b/lib/expand_variables.rb index 45af30f46dc..3a50925d628 100644 --- a/lib/expand_variables.rb +++ b/lib/expand_variables.rb @@ -7,7 +7,7 @@ module ExpandVariables value.gsub(/\$([a-zA-Z_][a-zA-Z0-9_]*)|\${\g<1>}|%\g<1>%/) do variables_hash ||= transform_variables(variables) - variables_hash[$1 || $2] + variables_hash[Regexp.last_match(1) || Regexp.last_match(2)] end end |