We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccd1f41 commit aadb128Copy full SHA for aadb128
spec/ruby/core/exception/interrupt_spec.rb
@@ -33,3 +33,19 @@
33
end
34
35
36
+
37
+describe "Interrupt" do
38
+ # This spec is basically the same as above,
39
+ # but it does not rely on Signal.trap(:INT, :SIG_DFL) which can be tricky
40
+ it "is raised on the main Thread by the default SIGINT handler" do
41
+ out = ruby_exe(<<-'RUBY', args: "2>&1")
42
+ begin
43
+ Process.kill :INT, Process.pid
44
+ sleep
45
+ rescue Interrupt => e
46
+ puts "Interrupt: #{e.signo}"
47
+ end
48
+ RUBY
49
+ out.should == "Interrupt: #{Signal.list["INT"]}\n"
50
51
+end
spec/tags/core/exception/interrupt_tags.txt
@@ -0,0 +1 @@
1
+slow:Interrupt is raised on the main Thread by the default SIGINT handler
0 commit comments