Skip to content

Commit

Permalink
Restore TruffleRuby on CI (#256)
Browse files Browse the repository at this point in the history
* Fix specs on TruffleRuby and Remove TruffleRuby specific expectations in specs
  • Loading branch information
andrykonchin authored Dec 9, 2024
1 parent b76b833 commit f668025
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:
- '3.2'
- '3.3'
# - jruby
# NOTE: temporarily disable truffleruby due to weird rspec issue
# - truffleruby
- truffleruby
name: Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v4
Expand Down
26 changes: 6 additions & 20 deletions spec/cli/commands/dns_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,9 @@
let(:name) { '/[abc/' }

it "must raise an OptionParser::InvalidArgument" do
# XXX: TruffleRuby's RegexpError exception message is different
if RUBY_ENGINE == 'truffleruby'
expect {
subject.parse_record_name(name)
}.to raise_error(OptionParser::InvalidArgument,"invalid argument: invalid Regexp: premature end of char-class (org.joni.exception.SyntaxException): /[abc/")
else
expect {
subject.parse_record_name(name)
}.to raise_error(OptionParser::InvalidArgument,"invalid argument: invalid Regexp: premature end of char-class: /[abc/")
end
expect {
subject.parse_record_name(name)
}.to raise_error(OptionParser::InvalidArgument,"invalid argument: invalid Regexp: premature end of char-class: /[abc/")
end
end
end
Expand Down Expand Up @@ -196,16 +189,9 @@
let(:name) { '/[abc/' }

it "must raise an OptionParser::InvalidArgument" do
# XXX: TruffleRuby's RegexpError exception message is different
if RUBY_ENGINE == 'truffleruby'
expect {
subject.parse_rule(rule)
}.to raise_error(OptionParser::InvalidArgument,"invalid argument: invalid Regexp: premature end of char-class (org.joni.exception.SyntaxException): /[abc/")
else
expect {
subject.parse_rule(rule)
}.to raise_error(OptionParser::InvalidArgument,"invalid argument: invalid Regexp: premature end of char-class: /[abc/")
end
expect {
subject.parse_rule(rule)
}.to raise_error(OptionParser::InvalidArgument,"invalid argument: invalid Regexp: premature end of char-class: /[abc/")
end
end
end
Expand Down

0 comments on commit f668025

Please sign in to comment.