diff --git a/lib/twine/formatters/django.rb b/lib/twine/formatters/django.rb index e9775c8..87d16fe 100644 --- a/lib/twine/formatters/django.rb +++ b/lib/twine/formatters/django.rb @@ -18,7 +18,6 @@ module Twine key_regex = /msgid *"(.*)"$/ value_regex = /msgstr *"(.*)"$/m - last_comment = nil while line = io.gets comment_match = comment_regex.match(line) if comment_match diff --git a/lib/twine/formatters/jquery.rb b/lib/twine/formatters/jquery.rb index 34bcad5..2712782 100644 --- a/lib/twine/formatters/jquery.rb +++ b/lib/twine/formatters/jquery.rb @@ -41,7 +41,7 @@ module Twine def format_sections(twine_file, lang) sections = twine_file.sections.map { |section| format_section(section, lang) } - sections.delete_if &:empty? + sections.delete_if(&:empty?) sections.join(",\n\n") end diff --git a/lib/twine/plugin.rb b/lib/twine/plugin.rb index c696223..ab841f9 100644 --- a/lib/twine/plugin.rb +++ b/lib/twine/plugin.rb @@ -57,7 +57,7 @@ module Twine end def join_path *paths - File.expand_path File.join *paths + File.expand_path File.join(*paths) end end end diff --git a/lib/twine/runner.rb b/lib/twine/runner.rb index bfba1fa..ca84e7d 100644 --- a/lib/twine/runner.rb +++ b/lib/twine/runner.rb @@ -299,7 +299,7 @@ module Twine end def find_formatter(&block) - formatters = Formatters.formatters.select &block + formatters = Formatters.formatters.select(&block) if formatters.empty? return nil elsif formatters.size > 1