Ruby 2.7 adds FrozenError receiver

Ruby 2.7 has added FrozenError#receiver to return the frozen object on which modification was attempted. It is similar to NameError#receiver. This can help in pinpointing the frozen object.

Before In Ruby, we use freeze on objects, to make sure objects are not allowed to be mutated by others. If we try to modify such a frozen object, it will throw a FrozenError.
Ruby 2.7 adds FrozenError receiver #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/ruby-2-7-adds-frozenerror-receiver

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles