mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Make Language#find_by_name case insensitive
This commit is contained in:
@@ -7,13 +7,13 @@ module Linguist
|
||||
def self.create(name)
|
||||
language = new(name)
|
||||
|
||||
@name_index[language.name] = language
|
||||
@name_index[language.name.downcase] = language
|
||||
|
||||
language
|
||||
end
|
||||
|
||||
def self.find_by_name(name)
|
||||
@name_index[name]
|
||||
@name_index[name.downcase]
|
||||
end
|
||||
|
||||
def self.[](name)
|
||||
|
||||
Reference in New Issue
Block a user