lib/byebug/commands/interrupt.rb in byebug-9.1.0 vs lib/byebug/commands/interrupt.rb in byebug-10.0.0

- old
+ new

@@ -1,7 +1,9 @@ -require 'byebug/command' +# frozen_string_literal: true +require "byebug/command" + module Byebug # # Interrupting execution of current thread. # class InterruptCommand < Command @@ -10,21 +12,23 @@ def self.regexp /^\s*int(?:errupt)?\s*$/ end def self.description - <<-EOD + <<-DESCRIPTION int[errupt] #{short_description} - EOD + DESCRIPTION end def self.short_description - 'Interrupts the program' + "Interrupts the program" end def execute + Byebug.start + Byebug.thread_context(Thread.main).interrupt end end end