Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed Oct 3, 2010
1 parent 693b9fe commit 1926810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mimemagic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def comment
# Lookup mime type by file extension
def self.by_extension(ext)
ext = ext.to_s.downcase
mime = EXTENSIONS[ext] || (ext[0..0] == '.' && EXTENSIONS[ext[1..-1]])
mime = ext[0..0] == '.' ? EXTENSIONS[ext[1..-1]] : EXTENSIONS[ext]
mime ? new(mime) : nil
end

Expand Down

0 comments on commit 1926810

Please sign in to comment.