Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit ef765b7

Browse files
committed
Gracefully handle Ruby < 1.9 in interrupt catching spec
1 parent 93c9c6a commit ef765b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/rspec/core/runner_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ module RSpec::Core
115115
let(:interrupt_handlers) { [] }
116116

117117
before do
118-
if RUBY_ENGINE == "jruby"
118+
if const_defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
119119
allow(Signal).to receive(:trap).with("INT", nil) do |&block|
120120
interrupt_handlers << block
121121
end

0 commit comments

Comments
 (0)