Sha256: a8b0bcbe22aaa032e114c957db99491991c63b95ef2e712b658ed4902c7dfcde

Contents?: true

Size: 486 Bytes

Versions: 26

Compression:

Stored size: 486 Bytes

Contents

require 'byebug/command'

module Byebug
  #
  # Interrupting execution of current thread.
  #
  class InterruptCommand < Command
    self.allow_in_control = true

    def self.regexp
      /^\s*int(?:errupt)?\s*$/
    end

    def self.description
      <<-EOD
        int[errupt]

        #{short_description}
      EOD
    end

    def self.short_description
      'Interrupts the program'
    end

    def execute
      Byebug.thread_context(Thread.main).interrupt
    end
  end
end

Version data entries

26 entries across 25 versions & 3 rubygems

Version Path
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/byebug-9.1.0/lib/byebug/commands/interrupt.rb
tdiary-5.0.6 vendor/bundle/gems/byebug-9.1.0/lib/byebug/commands/interrupt.rb
byebug-9.1.0 lib/byebug/commands/interrupt.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/byebug-9.0.6/lib/byebug/commands/interrupt.rb
tdiary-5.0.5 vendor/bundle/gems/byebug-9.0.6/lib/byebug/commands/interrupt.rb
tdiary-5.0.4 vendor/bundle/gems/byebug-9.0.6/lib/byebug/commands/interrupt.rb
byebug-9.0.6 lib/byebug/commands/interrupt.rb
byebug-9.0.5 lib/byebug/commands/interrupt.rb
byebug-9.0.4 lib/byebug/commands/interrupt.rb
byebug-9.0.3 lib/byebug/commands/interrupt.rb
byebug-9.0.2 lib/byebug/commands/interrupt.rb
byebug-9.0.1 lib/byebug/commands/interrupt.rb
byebug-9.0.0 lib/byebug/commands/interrupt.rb
byebug-8.2.5 lib/byebug/commands/interrupt.rb
byebug-8.2.4 lib/byebug/commands/interrupt.rb
byebug-8.2.3 lib/byebug/commands/interrupt.rb
byebug-8.2.2 lib/byebug/commands/interrupt.rb
byebug-8.2.1 lib/byebug/commands/interrupt.rb
byebug-8.2.0 lib/byebug/commands/interrupt.rb
byebug-8.1.0 lib/byebug/commands/interrupt.rb