diff --git a/lib/linguist.rb b/lib/linguist.rb index 3929efb9..589869c6 100644 --- a/lib/linguist.rb +++ b/lib/linguist.rb @@ -13,8 +13,8 @@ class << Linguist def instrument(*args, &bk) if instrumenter instrumenter.instrument(*args, &bk) - else - yield if block_given? + elsif block_given? + yield end end end diff --git a/lib/linguist/lazy_blob.rb b/lib/linguist/lazy_blob.rb index 28fb78f3..e828dca6 100644 --- a/lib/linguist/lazy_blob.rb +++ b/lib/linguist/lazy_blob.rb @@ -86,8 +86,8 @@ module Linguist protected # Returns true if the attribute is present and not the string "false". - def boolean_attribute(attr) - attr != "false" + def boolean_attribute(attribute) + attribute != "false" end def load_blob!