rbs
rbs copied to clipboard
Type Signature for Ruby
In Ruby language, developers need to use both "include" and "extend" to implement mix-in having instance methods and class methods. The auto extending module is a well-known technique to realize...
In Ruby language, developers need to use both "include" and "extend" to implement mix-in having instance methods and class methods. The auto extending module is a well-known technique to realize...
```rbs class MyWrapper[E] def self.of: (E) -> instance # RBS::UnknownTypeName (it’s not inferred from `MyWrapper[E]`) def self.of: (E) -> instance[E] # RBS::SyntaxError def self.of: [E] (E) -> instance # ok,...
In Ruby, `stringio` is a stdlib. https://github.com/ruby/ruby/tree/50520cc1930331bccdb94730e17ddc01798f2be0/ext/stringio But currently, RBS has `string_io` as a core library unexpectedly. https://github.com/ruby/rbs/blob/abcc97d3c8b024856ba9603a7ef22d422652ff42/core/string_io.rbs So we should do the two things: * Move string_io.rbs from `core/`...
Currently `manifest.yaml` does not allow gems as dependencies. For example: ```yaml # manifest.yaml for gem X dependencies: - name: ast ``` When your `Gemfile.lock` contains the gem X, `rbs collection...
refs: https://github.com/ruby/rbs/pull/1226 I also find `annotate:rdoc:*' and `steep:deprecated` and `pure' annotations. I think the former two are not needed to be documented. But it might be better to document the...
The rest of `rake annotate` changes from a184eda & dc59809
The interface `_Range[T]` currently returns `T?` for `begin` and `end`. This precludes ranges which require both a beginning and an end (eg used in `Kernel#rand`). The solution is to make...
The current definition, `type range[T] = Range[T] | _Range[T]` is mostly correct, except it implicitly requires `T` to implement ``: `Range` cannot be constructed unless `T` defines ``. This imposes...