mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Treat lines as enumerator and not array
This commit is contained in:
@@ -34,7 +34,7 @@ module Linguist
|
|||||||
|
|
||||||
# Check for multiline shebang hacks that call `exec`
|
# Check for multiline shebang hacks that call `exec`
|
||||||
if script == 'sh' &&
|
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
|
script = $1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user