General

Profile

rab (Rob Biedenharn)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 0 0

Activity

06/11/2018

02:38 PM Ruby Feature #14680: Adding +@ and -@ to hash and array
My question is whether this would pass:
~~~ ruby
def test_uminus
a = { a: 1, b: 2, c: 3 }
refute a.frozen?
assert (-a).frozen?
a = { a: 1, b: 2, c: 3 }.freeze
assert_equal a, -a
# * If the hash is ...
rab (Rob Biedenharn)

05/17/2018

11:26 PM Ruby Feature #14680: Adding +@ and -@ to hash and array
If `-@` is supposed to return a frozen *copy*, is that patch really doing that? The tests don't seem to ensure that. Do `rb_hash_freeze` and `rb_ary_freeze` make copies first or `.freeze` the given object? rab (Rob Biedenharn)

Also available in: Atom