Anyway, I recommend you to rewrite it with a block parameter:
def foo bar = nil, &b
(b || bar).call
end
I also ran into this issue as Proc.new was used in a few places in Sequel. Removing implicit block support for Proc.new makes it no longer possible to have a default value for a positional argument that uses the block, since the block argument variable is not set until after default values for positional arguments (e.g. https://github.com/jeremyevans/sequel/commit/34faf32c6eddc02d1499748a431f3fdf46bfc5a4#diff-29540b6b617d51d3f5356b1cdfc534b0L61). I feel the loss of functionality is acceptable, since Proc.new's implicit block support was fairly magical and not widely known/used.
I always thought Proc.new working without an explicit block was an unintended feature in MRI, and indeed fairly magical, so I support taking a more explicit way in 2.7.