Hello, Ruby 2.5.3 just crashed with a segfault in my Sidekiq worker. This is on my Mac OS Mojave, and I am using the jemalloc allocator. Ruby was installed using RVM. I have attached "ruby-crash-report-logs.txt", which contains the ou...nathan.f77 (Nathan Broadbent)
> Nathan, Date is only available in stdlib (maybe it should be moved to core) so I don't think those literals will work for dates with "D". I would definitely vote to move Date to core, I think that's a great idea > ... Yep, I thin...nathan.f77 (Nathan Broadbent)
Nobuyoshi Nakada wrote: > I don't think there is possibilities to introduce `%d` and `%i`, especially using variables. I understand if the syntax doesn't feel quite right, I'm not sure about it either. But I think it should be quite ...nathan.f77 (Nathan Broadbent)
I'm working on a Ruby application where we have to deal with a lot of dates and times, especially in our test suite. We currently have a couple thousand cases of `Date.new(...)`, and I'm finding the syntax to be a little unwieldy. Wha...nathan.f77 (Nathan Broadbent)
> > I'd even say that `embed` is wrong. > > I would like to know of a good example of use case. I often succumb to the > temptation of writing more complex code to avoid creating a local var, but > that doesn't always make for...nathan.f77 (Nathan Broadbent)
I really like `~[1, 2, 3]` as a shortcut for `Set.new([1, 2, 3])`: ```ruby class Array def ~@ Set.new self end end ``` My other preferences would be: 1) `<1, 2, 3>` 2) `{1, 2, 3}`, and `{/}` for `Set.new`.nathan.f77 (Nathan Broadbent)
> > 1) The form you suggest would be redundant with `Enumerable#to_h` >
I agree that 'Enumerable#to_h' would seem more appropriate than the block-less version of 'associate'. To me, the 'associate' verb implies that the pro...nathan.f77 (Nathan Broadbent)
Jeremy Kemper proposed Enumerable#associate during the discussion in #7297, with the following details: ------------------- Some background: #4151 proposes an Enumerable#categorize API, but it's complex and hard to understand it...nathan.f77 (Nathan Broadbent)