General

Profile

marcandre (Marc-Andre Lafortune)

Issues

Projects

Activity

06/22/2019

04:57 AM Ruby trunk Feature #9948 (Closed): Safely insert an object into an array
marcandre (Marc-Andre Lafortune)

06/14/2019

02:53 PM Ruby trunk Feature #15899: String#before and String#after
sawa is right. Just use `partition` and `rpartition`. marcandre (Marc-Andre Lafortune)

06/13/2019

10:03 PM Ruby trunk Feature #15901: Enumerator::Lazy#eager
zverok (Victor Shepelev) wrote:
> > How about this style?
>
> ```ruby
> [0, 1, 2].lazy {|e| e.map {|n| n + 1 }.m...
marcandre (Marc-Andre Lafortune)

06/12/2019

02:20 PM Ruby trunk Feature #15918: Pattern matching for Set
Eregon (Benoit Daloze) wrote:
> Did you mean `in Set[1, 2, 3]` ?
I didn't, but it should match too; it's the same...
marcandre (Marc-Andre Lafortune)
01:44 PM Ruby trunk Feature #15918 (Open): Pattern matching for Set
Currently, `Set` does not respond to `deconstruct`. Shouldn't we implement it using `to_a`?
```
require 'set'
ca...
marcandre (Marc-Andre Lafortune)
01:41 PM Ruby trunk Feature #15917 (Open): Pattern matching for Struct
`Struct`s respond to `deconstruct`, not to `deconstruct_keys`. Shouldn't we also implement it?
```
A = Struct.new...
marcandre (Marc-Andre Lafortune)
01:23 PM Ruby trunk Feature #15881: Optimize deconstruct in pattern matching
mame (Yusuke Endoh) wrote:
> I talked with ktsj, the author of pattern matching. He had actually considered caching...
marcandre (Marc-Andre Lafortune)

05/27/2019

04:37 PM Ruby trunk Bug #15880 (Rejected): Wrong precedence of the if modifier in pattern matching
This is necessary so the `if` can depend on the variables of the matching, e.g. `in [Integer => x] if x.odd?`
marcandre (Marc-Andre Lafortune)
04:19 PM Ruby trunk Feature #15881 (Open): Optimize deconstruct in pattern matching
```ruby
class A
def deconstruct
puts 'deconstruct called'
[1]
end
end
case A.new
in [2]
2
i...
marcandre (Marc-Andre Lafortune)

05/25/2019

05:32 PM Ruby trunk Bug #15872: CSV.parse omits close call when block is given – intended or bug?
FWIW, I believe this is a bug.
> When a block is given and the argument is an IO-like object, it may not reach its...
marcandre (Marc-Andre Lafortune)

Also available in: Atom