rbs icon indicating copy to clipboard operation
rbs copied to clipboard

How to type refinements

Open HoneyryderChuck opened this issue 4 years ago • 1 comments

Is there a way to add signatures for methods in core classes added via refinements?

I remember there was an extends (or smth similar?) keyword for monkey patches, but that has since disappeared from the syntax page. Is there an alternative?

HoneyryderChuck avatar Jul 05 '21 15:07 HoneyryderChuck

I believe many cases of refinements could be resolved if the using method signature of the main object would be supported.

See https://github.com/ruby/rbs/issues/1117#issuecomment-1272565614

ybiquitous avatar Oct 11 '22 06:10 ybiquitous