Treat lines as enumerator and not array

This commit is contained in:
Brandon Keepers
2014-11-28 13:55:55 -06:00
parent 88f08803ee
commit 47b739527a

View File

@@ -34,7 +34,7 @@ module Linguist
# Check for multiline shebang hacks that call `exec`
if script == 'sh' &&
lines[0...5].any? { |l| l.match(/exec (\w+).+\$0.+\$@/) }
lines.first(5).any? { |l| l.match(/exec (\w+).+\$0.+\$@/) }
script = $1
end