mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Handle nil blob names
This commit is contained in:
@@ -34,7 +34,7 @@ module Linguist
|
||||
|
||||
# Public: Read file permissions
|
||||
#
|
||||
# Returns a String like '0100644'
|
||||
# Returns a String like '100644'
|
||||
def mode
|
||||
File.stat(@path).mode.to_s(8)
|
||||
end
|
||||
|
||||
@@ -94,7 +94,7 @@ module Linguist
|
||||
#
|
||||
# Returns Language or nil.
|
||||
def self.detect(blob)
|
||||
name = blob.name
|
||||
name = blob.name.to_s
|
||||
|
||||
# A bit of an elegant hack. If the file is executable but extensionless,
|
||||
# append a "magic" extension so it can be classified with other
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module Linguist
|
||||
VERSION = "2.13.0.github3"
|
||||
VERSION = "2.13.0.github4"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user