rbs
rbs copied to clipboard
Relax need for block
Deciding that block is essential is difficult and often wrong.
This method of following type signature,
def foo
yield if block_given?
end
I expected to following.
def foo: () ?{ () -> untyped } -> untyped
However, it is actually required because of the existence of yield.
def foo: () { () -> untyped } -> untyped
Actual case https://github.com/ruby/gem_rbs_collection/pull/16
@soutaro @pocke How about this?
#1180 improved this problem.
@soutaro I don't think the problem has been improved. Please see my comments https://github.com/ruby/rbs/pull/1180#issuecomment-1360942094