General

Profile

cha1tanya (Prathamesh Sonpatki)

  • Login: cha1tanya
  • Email: csonpatki@gmail.com
  • Registered on: 07/13/2012
  • Last sign in: 11/11/2019

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 5 6

Activity

02/27/2020

02:08 AM Ruby Revision 9a422fc0 (git): Update docs for Time#at method [ci skip]
Add docs about all possible options for the `in` argument. cha1tanya (Prathamesh Sonpatki)

08/03/2019

05:50 AM Ruby Feature #16039: Array#contains? to check if one array contains another array
Agree that `superset` is better name. Here is the actual use case:
```ruby
Project.pluck(:id).contains?([1,2,3])
```
Where `Project.pluck` returns an array of integers.
To use set, I have to convert the array to a set.
```...
cha1tanya (Prathamesh Sonpatki)

08/02/2019

06:09 PM Ruby Feature #16039 (Open): Array#contains? to check if one array contains another array
I woud like to propose `Array#contains?` which will check if the one array is part of another array.
Implementation can be as follows:
```
def contains?(other)
(other - self).empty?
end
```
Some test cases:
```
[1, 2, 3]...
cha1tanya (Prathamesh Sonpatki)

11/18/2016

03:31 PM Ruby Bug #12955 (Third Party's Issue): BigDecimal::INFINITY and BigDecimal::NAN to_json and as_json should error out similar to Float::INFINITY and Float::NAN
Currently, `Float::INFINITY` and `Float::NAN` error out when we try to convert them into JSON representation using `as_json` or `to_json` based on the following code from /ruby/ext/json/generator.c
~~~ c
if (!allow_nan) {
...
cha1tanya (Prathamesh Sonpatki)

10/22/2016

08:23 AM Ruby Bug #12863 (Closed): Hash#compact! behavior different from the Active Support Hash#compact!
Hash#compact and Hash#compact! were added in https://bugs.ruby-lang.org/issues/11818 but the Hash#compact! is different from Active Support. Please check following snippet:
~~~ ruby
# Active Support
>> hash = { a: true, b: false, c:...
cha1tanya (Prathamesh Sonpatki)

10/22/2013

06:05 PM Ruby Bug #9002: Use simpler example for File#expand_path
Thanks Benoit :) cha1tanya (Prathamesh Sonpatki)

10/19/2013

10:00 PM Ruby Bug #9002: Use simpler example for File#expand_path
Updated based on suggestions of @zzak and @Eregon. Please take a look cha1tanya (Prathamesh Sonpatki)

10/11/2013

12:23 PM Ruby Bug #9002: Use simpler example for File#expand_path
Can we give both examples? I think the original example is a bit hard to understand due to two "..". In the first example we can show normal use and in second example, as you pointed out, how to resolve "..".
Eregon (Benoit Daloze) wrot...
cha1tanya (Prathamesh Sonpatki)

10/09/2013

02:06 AM Ruby Bug #9002 (Closed): Use simpler example for File#expand_path
Use simpler example for File#exapnd_path when start_directory path is given. cha1tanya (Prathamesh Sonpatki)

09/22/2013

08:11 PM Ruby Bug #8888: Fix grammar for documentation of #bm of Benchmark module
zzak (Zachary Scott) wrote:
> This issue was solved with changeset r43002.
> ...
Thanks @zzak
cha1tanya (Prathamesh Sonpatki)

Also available in: Atom