diff --git a/spec/ameba/formatter/todo_formatter_spec.cr b/spec/ameba/formatter/todo_formatter_spec.cr index 3f7a8214..ec9fdf99 100644 --- a/spec/ameba/formatter/todo_formatter_spec.cr +++ b/spec/ameba/formatter/todo_formatter_spec.cr @@ -2,7 +2,7 @@ require "../../spec_helper" require "file_utils" module Ameba - private def with_formatter + private def with_formatter(&) io = IO::Memory.new formatter = Formatter::TODOFormatter.new(io) diff --git a/src/ameba/runner.cr b/src/ameba/runner.cr index c2c5ac51..fb2be08a 100644 --- a/src/ameba/runner.cr +++ b/src/ameba/runner.cr @@ -179,7 +179,7 @@ module Ameba private MAX_ITERATIONS = 200 - private def loop_unless_infinite(source, corrected_issues) + private def loop_unless_infinite(source, corrected_issues, &) # Keep track of the state of the source. If a rule modifies the source # and another rule undoes it producing identical source we have an # infinite loop. diff --git a/src/ameba/source/rewriter/action.cr b/src/ameba/source/rewriter/action.cr index 5fa1cc96..a13013c2 100644 --- a/src/ameba/source/rewriter/action.cr +++ b/src/ameba/source/rewriter/action.cr @@ -111,7 +111,7 @@ class Ameba::Source::Rewriter end # Similar to `@children.bsearch_index || size` except allows for a starting point - protected def bsearch_child_index(from = 0) + protected def bsearch_child_index(from = 0, &) size = @children.size (from...size).bsearch { |i| yield @children[i] } || size end