> There are also some concerns with keyword arguments, but since I have no idea how problematic this might be, I decided to give it a go.

For what it's worth, I've tested Ruby 2.7 on a fairly large number of packages (a couple hundred) and I only encountered one warning regarding keyword arguments. So it's not a huge issue as far as I'm concerned.

Here's what the warning look like:

~/projects/asciidoctor/kramdown-asciidoc/.bundle/gems/ruby/2.7.0/gems/deep-cover-core-0.7.7/lib/deep_cover/analyser/stats.rb:51: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
~/projects/asciidoctor/kramdown-asciidoc/.bundle/gems/ruby/2.7.0/gems/deep-cover-core-0.7.7/lib/deep_cover/analyser/stats.rb:17: warning: The called method `initialize' is defined here

Both warnings pertain to the same method definition, one at the call site and one at the definition.

Here's the definition:

    def initialize(executed: 0, not_executed: 0, not_executable: 0, ignored: 0)
      @executed = executed
      @not_executed = not_executed
      @not_executable = not_executable
      @ignored = ignored
      freeze
    end

Here's the call site:

Analyser::StatsBase.new(to_h.transform_values { |v| (100 * v).fdiv(total).round(DECIMALS) })

So a hash is being passed off as keyword arguments. Ruby wants you to make the conversion explicit. That's the essence of this change.

Best,

-Dan

--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux