Module: Pry::TooSafeException

Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/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/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/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