diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f398f29c..cd8732829 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,9 +21,9 @@ jobs: test: strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: ['ubuntu-20.04', windows-latest] ruby: - - 2.0 + - '2.0' - 2.1 - 2.2 - 2.3 diff --git a/spec/pry_spec.rb b/spec/pry_spec.rb index 892b437df..471da6f90 100644 --- a/spec/pry_spec.rb +++ b/spec/pry_spec.rb @@ -194,10 +194,6 @@ class Hello skip "jruby allows mutex usage in signal handlers" end - if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.0.0") - skip "pre-2.0 mri allows mutex usage in signal handlers" - end - trap("USR1") { @str_output = mock_pry } end @@ -210,6 +206,9 @@ class Hello it "should return with error message" do expect(mock_pry('1 + 1')).to eql("=> 2\n") Process.kill("USR1", Process.pid) + + sleep 0.01 if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1.0") + expect(@str_output).to match(/Unable to obtain mutex lock/) end end