Module: Pry::FrozenObjectException

Defined in:
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



52
53
54
55
56
57
# File 'lib/pry/exceptions.rb', line 52

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