Module: Pry::TooSafeException

Defined in:
lib/pry/exceptions.rb

Overview

Catches SecurityErrors if $SAFE is set

Class Method Summary collapse

Class Method Details

.===(exception) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/pry/exceptions.rb', line 29

def self.===(exception)
  if Pry::HAS_SAFE_LEVEL
    $SAFE > 0 && exception.is_a?(SecurityError)
  else
    exception.is_a?(SecurityError)
  end
end