Merge pull request #2776 from humzashah/minor-code-improvements

minor code improvements
This commit is contained in:
Arfon Smith
2015-12-18 11:50:25 -05:00
2 changed files with 4 additions and 4 deletions

View File

@@ -13,8 +13,8 @@ class << Linguist
def instrument(*args, &bk) def instrument(*args, &bk)
if instrumenter if instrumenter
instrumenter.instrument(*args, &bk) instrumenter.instrument(*args, &bk)
else elsif block_given?
yield if block_given? yield
end end
end end
end end

View File

@@ -86,8 +86,8 @@ module Linguist
protected protected
# Returns true if the attribute is present and not the string "false". # Returns true if the attribute is present and not the string "false".
def boolean_attribute(attr) def boolean_attribute(attribute)
attr != "false" attribute != "false"
end end
def load_blob! def load_blob!