rbs
rbs copied to clipboard
Type Signature for Ruby
Will there be a way to deal with overriding `method_missing`? For instance, if I delegate the method calls to an instance variable, I'd like to "inherit" this object's API: ```ruby...
As one core meta-programming feature from ruby is enhancing of existing classes, or even the creation of anonymous new ones, I'm wondering whether this is possible already. Something like: ```ruby...
Sider tests look nice, but the current codebase should pass its tests... For example I modified a line containing `arg0` and got an error because of that... It seems to...
https://github.com/ruby/rbs/blob/c64d1f5ba5a4fbc95ffb1d72d783ee39b17d60fe/stdlib/builtin/builtin.rbs already contains an `_Each` interface, but one where an enumerable can also be returned is missing. These are fairly common btw. Here's a proposal: ```ruby interface _Each[out A, out...
I didn't find in the documentation how to declare if an exception can be thrown. Is this something that will be supported?
A pattern used a bit in the wild is the delegation of arguments to another method: ``` ruby def perform(*args) # log things, activate gear do_perform(*args) end def do_perform(key, value,...
There are some "state management" methods, which do not have relevant type information. Ex: a `#close` method on some object. A proposal for such a syntax would be to group...
The current signature for `Array#zip` accepts exactly one array argument, but the actual `zip` acceptes one or more arrays. Can we write a signature for this? ``` pp [1, 2,...
https://github.com/ruby/rbs/blob/418f74d11ee0f02eea5efe3514057d1d629afc0c/stdlib/builtin/hash.rbs#L52-L61 Doc entry at the linked line isn't compliant with ruby 2.7 anymore... I'm not really sure what the best way to present the alternative would be.
The option allows working with RBSs with unknown type names. It allows continue working without defining all of the classes beforehand.