Ruby 2.7 adds FrozenError receiver

05-Sep-2019 1650

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.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle