methods/yield_qmark_call.rb

tests/_examples/methods/yield_qmark_call.rb in the metorex repository.

class Foo
  def yield?(invert = false)
    !invert
  end

  def check
    yield?(false)
  end
end

puts Foo.new.check

Output:

true