diff --git a/features/support/helpers.rb b/features/support/helpers.rb index 3a85a3b0..79210ad7 100644 --- a/features/support/helpers.rb +++ b/features/support/helpers.rb @@ -91,7 +91,7 @@ end def run_jekyll(args) args = args.strip.split(" ") # Shellwords? process = run_in_shell(Paths.jekyll_bin.to_s, *args, "--trace") - process.exitstatus == 0 + process.exitstatus.zero? end # diff --git a/lib/jekyll/collection.rb b/lib/jekyll/collection.rb index ebe6891c..f04fdb3f 100644 --- a/lib/jekyll/collection.rb +++ b/lib/jekyll/collection.rb @@ -25,7 +25,7 @@ module Jekyll # Override of normal respond_to? to match method_missing's logic for # looking in @data. - def respond_to?(method, include_private = false) + def respond_to_missing?(method, include_private = false) docs.respond_to?(method.to_sym, include_private) || super end diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 8d57f666..c70cdd2c 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -374,7 +374,7 @@ module Jekyll private def check_maruku(config) - if config.fetch("markdown", "kramdown").to_s.casecmp("maruku") == 0 + if config.fetch("markdown", "kramdown").to_s.casecmp("maruku").zero? Jekyll.logger.abort_with "Error:", "You're using the 'maruku' " \ "Markdown processor, which has been removed as of 3.0.0. " \ "We recommend you switch to Kramdown. To do this, replace " \ diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb index e160e640..9c67d848 100644 --- a/lib/jekyll/document.rb +++ b/lib/jekyll/document.rb @@ -367,7 +367,7 @@ module Jekyll def <=>(other) return nil unless other.respond_to?(:data) cmp = data["date"] <=> other.data["date"] - cmp = path <=> other.path if cmp.nil? || cmp == 0 + cmp = path <=> other.path if cmp.nil? || cmp.zero? cmp end diff --git a/lib/jekyll/drops/document_drop.rb b/lib/jekyll/drops/document_drop.rb index 2600baa5..ed851821 100644 --- a/lib/jekyll/drops/document_drop.rb +++ b/lib/jekyll/drops/document_drop.rb @@ -25,7 +25,7 @@ module Jekyll def <=>(other) return nil unless other.is_a? DocumentDrop cmp = self["date"] <=> other["date"] - cmp = self["path"] <=> other["path"] if cmp.nil? || cmp == 0 + cmp = self["path"] <=> other["path"] if cmp.nil? || cmp.zero? cmp end diff --git a/lib/jekyll/liquid_renderer/table.rb b/lib/jekyll/liquid_renderer/table.rb index d3859647..a078f831 100644 --- a/lib/jekyll/liquid_renderer/table.rb +++ b/lib/jekyll/liquid_renderer/table.rb @@ -43,7 +43,7 @@ module Jekyll str = "" row_data.each_with_index do |cell_data, cell_index| - str << if cell_index == 0 + str << if cell_index.zero? cell_data.ljust(widths[cell_index], " ") else cell_data.rjust(widths[cell_index], " ")