Module: Pry::FrozenObjectException

Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/exceptions.rb

Overview

When we try to get a binding for an object, we try to define a method on that Object’s singleton class. This doesn’t work for “frozen” Object’s, and the exception is just a vanilla RuntimeError.

Class Method Summary collapse

Class Method Details

.===(exception) ⇒ Object



57
58
59
60
61
62
63
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/exceptions.rb', line 57

def self.===(exception)
  [
    "can't modify frozen class/module",
    "can't modify frozen Class",
    "can't modify frozen object"
  ].include?(exception.message)
end