rbs
rbs copied to clipboard
Syntax to bound generics of self in method
It would be nice if it's possible to bound generics of self.
Example usecase:
class Array[Elem]
def sort: [Elem < Comparable] () -> ::Array[Elem]
| [Elem < Comparable] () { (Elem a, Elem b) -> ::Integer } -> ::Array[Elem]
end