You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix @Generic return type lost when method also declares a block param
Pin::Callable#arity_matches? rejected any call missing a block whenever
the method signature had block info attached, even when that info came
from a bare &block formal parameter with no @yield tags. Ruby never
requires callers to pass a block for such a parameter, so this caused
the sole matching signature to be discarded, skipping generic
resolution and leaving the return type as unresolved generic<T>.
Add Pin::Callable#block_required?, true only for RBS-sourced signatures
with a non-optional block ({ ... } vs ?{ ... }), and gate the arity
check on it instead of bare block presence. YARD-derived signatures
have no way to express a required block, so they default to false.
Fixescastwide#1265
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNnFsUN4Uryo6Xqh7xv2sr
0 commit comments