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 #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

Freelance software developer Ruby On Rails (4 years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles