diff options
Diffstat (limited to 'lib/irb/command/disable_irb.rb')
-rw-r--r-- | lib/irb/command/disable_irb.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/irb/command/disable_irb.rb b/lib/irb/command/disable_irb.rb new file mode 100644 index 0000000000..0b00d0302b --- /dev/null +++ b/lib/irb/command/disable_irb.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module IRB + # :stopdoc: + + module Command + class DisableIrb < Base + category "IRB" + description "Disable binding.irb." + + def execute(*) + ::Binding.define_method(:irb) {} + IRB.irb_exit + end + end + end + + # :startdoc: +end |