From ea1fc90cf5610acf6dd987af324ceab7ed78dbc0 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Mon, 16 Jun 2014 18:41:51 +0200 Subject: [PATCH] Handle `nil` blob names --- lib/linguist/file_blob.rb | 2 +- lib/linguist/language.rb | 2 +- lib/linguist/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/linguist/file_blob.rb b/lib/linguist/file_blob.rb index 9123922f..7e7f1acd 100644 --- a/lib/linguist/file_blob.rb +++ b/lib/linguist/file_blob.rb @@ -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 diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index bdaa91e8..ffbecb7b 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -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 diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index c47a92f3..232278b4 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "2.13.0.github3" + VERSION = "2.13.0.github4" end