yield
instead of block call RB-PR1015Use of a &block
parameter and block.call
can be replaced by yield
in some cases.
def method(&block)
block.call
end
def another(&func)
func.call 1, 2, 3
end
def method
yield
end
def another
yield 1, 2, 3
end