lib/overcommit/plugins/pre_commit/js_syntax.rb in overcommit-0.2.3 vs lib/overcommit/plugins/pre_commit/js_syntax.rb in overcommit-0.2.4
- old
+ new
@@ -4,10 +4,10 @@
file_type :js
def run_check
return :warn, 'Need either `jshint` or `rhino` in path' unless runner
- paths = staged.map { |s| s.path }.join(' ')
+ paths = staged.collect(&:path).join(' ')
output = runner.call(paths)
return (output.empty? ? :good : :bad), output
end