Marc-André Lafortune

Results 450 comments of Marc-André Lafortune

I think you can use an intersection. Since you're returning a class, I think `singleton` is what you want: ``` def self.enhance: () -> singleton(A & Ext) ```

Oh, right. Replace `A` with `self`: ``` def self.enhance: () -> singleton(self & Ext) ``` I didn't try it and I'm just starting to get acquainted with RBS. Maybe it's...

It's taking your `A` literally. You need `[A]`. Maybe this would work: ```sh module Ext def self.enhance: [A] (singleton(A)) -> singleton(A) & singleton(Ext::InstanceMethods) end ```

> I don't want to add a new line with `arg0` I agree with this > while I don't want to fix all of the existing code. This is my...

I believe tou can use `alias perform do_perform`

I imagine this can be closed now? If I'm not mistaken, it should look like: ``` def zip: (*Array[untyped]) -> Array[Array[untyped]] | (*Array[untyped]) { (Array[untyped]) -> void } -> nil...

Maybe, but very few builtin methods take such a parameter. I can think of `Enumerable#find` (which is currently badly defined) Note that the return type should not be `void` but...

> `Enumerable#each` is the most obvious example, I think. For example: > > ``` > :0> [].each > => # > ``` > > Currently, [the way it's defined](https://github.com/ruby/rbs/blob/c64d1f5ba5a4fbc95ffb1d72d783ee39b17d60fe/stdlib/builtin/enumerable.rbs#L8), the...

It could definitely be useful as a shorthand, but maybe should be named something different like `_Iterable`? I think `_MethodName` should be restricted to interfaces that implement that `method_name` minimally....

@eregon, oops, missed that notification, sorry. Yes, I used CRuby tests to check my backport (and I was glad to have them all pass, except those that were checking that...