lib/i18n/tasks/scanners/pattern_scanner.rb in i18n-tasks-0.7.9 vs lib/i18n/tasks/scanners/pattern_scanner.rb in i18n-tasks-0.7.10

- old
+ new

@@ -59,10 +59,10 @@ /controllers/.match(path) end def closest_method(location) method = File.readlines(location[:src_path]).first(location[:line_num] - 1).reverse_each.find { |x| x=~ /\bdef\b/ } - method &&= method.strip.sub(/^def\s*/, '') + method &&= method.strip.sub(/^def\s*/, '').sub(/[\(\s;].*$/, '') method end def pattern @pattern ||= config[:pattern].present? ? Regexp.new(config[:pattern]) : default_pattern