Skip to content

Enable more tests now that TruffleRuby supports pattern matching #435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,15 @@ def assert_syntax_tree(node)
refute_includes(json, "#<")
assert_equal(type, JSON.parse(json)["type"])

if RUBY_ENGINE != "truffleruby"
# Get a match expression from the node, then assert that it can in fact
# match the node.
# rubocop:disable all
assert(eval(<<~RUBY))
case node
in #{node.construct_keys}
true
end
RUBY
end
# Get a match expression from the node, then assert that it can in fact
# match the node.
# rubocop:disable all
assert(eval(<<~RUBY))
case node
in #{node.construct_keys}
true
end
RUBY
end

Minitest::Test.include(self)
Expand Down
2 changes: 1 addition & 1 deletion test/translation/parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ParserTest < Minitest::Test
)
end

if current_version < "3.2" || RUBY_ENGINE == "truffleruby"
if current_version < "3.2"
known_failures.push(
"test_if_while_after_class__since_32:11004",
"test_if_while_after_class__since_32:11014",
Expand Down