General

Profile

prajjwal (Prajjwal Singh)

  • Login: prajjwal
  • Registered on: 09/04/2019
  • Last sign in: 01/12/2021

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 2 1 3

Activity

01/22/2025

02:08 PM Ruby Revision c6e8ee45 (git): [ruby/irb] Add copy command (https://github.com/ruby/irb/pull/1044)
Closes https://github.com/ruby/irb/pull/753
https://github.com/ruby/irb/commit/a24ac53d48
prajjwal (Prajjwal Singh)

01/12/2021

11:15 AM Ruby Bug #17529: Ractor Segfaults with GC enabled
Just confirmed that it only segfaults when ruby is configured with the `--enable-shared` option (which `rbenv` does by default).
Even more info:
```
glibc 2.32-5
```
prajjwal (Prajjwal Singh)
10:21 AM Ruby Bug #17529: Ractor Segfaults with GC enabled
@ko1
It crashes for any value of ARGV[0] between 1 and 25 (that I tested).
The fact that its happening so consistently for me and not for you makes me wonder if the problem stems from my version of Linux or GCC? Some other compile ...
prajjwal (Prajjwal Singh)
01:06 AM Ruby Bug #17529 (Closed): Ractor Segfaults with GC enabled
I've been benchmarking `Ractor` on my machine with the following naive prime number generator:
```ruby
# frozen_string_literal: true
def prime?(n)
2.upto(n - 1).none? { |i| n % i == 0 }
end
NUM_WORKERS = ARGV[0].to_i
pro...
prajjwal (Prajjwal Singh)

05/25/2020

11:33 PM Ruby Feature #16913 (Open): Add `ARGF#each_io`
Add an iterator for each file supplied on the command line, or STDIN. `ARGF#each_io`
## Current Status
Often, we need to do something with individual files ARGF knows about rather than the concatenation of them. We can combine `ARG...
prajjwal (Prajjwal Singh)

03/07/2020

06:39 AM Ruby Feature #16665: Add an Array#except_index method
There needs to be more discussion on the behavior of this method.
Logically, `except_indices` should be the complement of `values_at`, so for the purpose of writing test cases I added this stopgap:
```ruby
def except_indices(*idx)
se...
prajjwal (Prajjwal Singh)
12:58 AM Ruby Feature #16665: Add an Array#except_index method
In my opinion `omit_indices` is the best name in the thread so far, but I'm not a huge fan of making my methods verbs. I propose `arr.except_indices(1, 2, 3)` as an alternative.
The negation of `values_at()` is a semi-common occurrenc...
prajjwal (Prajjwal Singh)
06:21 AM Ruby Misc #16678 (Open): Array#values_at has unintuitive behavior when supplied a range starting with negative index
Consider the following:
``` ruby
# frozen_string_literal: true
a = (1..5).to_a
p a.values_at(3..5) # => [4, 5, nil]
p a.values_at(-1..3) # => []
```
When the range begins with a negative `(-1, 0, 1, 2, 3)`, it returns an ...
prajjwal (Prajjwal Singh)
01:03 AM Ruby Feature #16673: total_timeout for Net::HTTP
`+1`. This is something I'd love to see implemented because this is actually the most common use case for me.
Could be implemented in a backwards compatible way (set `open_timeout` and `read_timeout` to `total_timeout` and abort appro...
prajjwal (Prajjwal Singh)

10/07/2019

06:59 AM Ruby Revision c8542ab4 (git): Add: Array#intersection method
prajjwal (Prajjwal Singh)

Also available in: Atom