summaryrefslogtreecommitdiff
path: root/lib/irb/command/disable_irb.rb
blob: 0b00d0302b056db0279bf923a5b6ce8d75972c9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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