Skip to content

Commit

Permalink
Merge pull request #2282 from andrehjr/fix-ruby22-build
Browse files Browse the repository at this point in the history
Fix Ruby 2.0 and Ruby 2.2 builds
  • Loading branch information
andrehjr committed Jul 17, 2023
2 parents fcf38f4 + e140501 commit f2f8add
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions spec/pry_spec.rb
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit f2f8add

Please sign in to comment.