summaryrefslogtreecommitdiff
path: root/lib/pry/pry_class.rb
diff options
context:
space:
mode:
authorOzer Chagatai <ochagata@gmail.com>2016-03-31 15:32:37 -0500
committerOzer Chagatai <ochagata@gmail.com>2016-04-01 15:16:17 -0500
commitfd1631f6de85e7810e7e78a9e283b2feb1a16df4 (patch)
treec4f8c275b65f1d99acc6ed80ece159505131d021 /lib/pry/pry_class.rb
parent90d127778f3f4e9581d9dfb5c17851af48867186 (diff)
downloadpry-fd1631f6de85e7810e7e78a9e283b2feb1a16df4.tar.gz
Added support for FAIL_PRY which will make pry raise a RuntimeError if it is called with that env variable present
Diffstat (limited to 'lib/pry/pry_class.rb')
-rw-r--r--lib/pry/pry_class.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb
index 2a1bae76..1609f376 100644
--- a/lib/pry/pry_class.rb
+++ b/lib/pry/pry_class.rb
@@ -161,6 +161,9 @@ you can add "Pry.config.windows_console_warning = false" to your .pryrc.
# Pry.start(Object.new, :input => MyInput.new)
def self.start(target=nil, options={})
return if ENV['DISABLE_PRY']
+ if ENV['FAIL_PRY']
+ raise 'You have FAIL_PRY set to true, which results in Pry calls failing'
+ end
options = options.to_hash
if in_critical_section?