Skip to content
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

Make the test suite pass on TruffleRuby and add it in CI #183

Merged
merged 7 commits into from
Oct 28, 2022

Conversation

eregon
Copy link
Contributor

@eregon eregon commented Oct 28, 2022

No description provided.

@@ -123,7 +123,7 @@ def compile_node(root)
elsif DynaSymbol === root and parts = root.parts and parts.size == 1 and TStringContent === parts[0]
symbol = parts[0].value.to_sym

->(attribute) { attribute == value }
->(node) { node == symbol }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to add a test to validate this change but couldn't find a way to trigger this case.
I tried things like:

    def test_search_string_simple
      results = search(%{"#{'abc'}"}, "StringLiteral[parts: [TStringContent[value: 'abc']]]")

      assert_equal 1, results.length
    end

    def test_search_symbol_simple
      puts %s{:"#{'abc'}"}
      puts ':"#{\'abc\'}"'
      results = search(':"#{\'abc\'}"', ':abc')
      results = search(':"#{\'abc\'}"', ':"#{\'abc\'}"')
      results = search(%{"#{'abc'}"}, "DynaSymbol[parts: [TStringContent[value: 'abc']]]")

      assert_equal 1, results.length
    end

But none seem to match this specific condition.

@kddnewton kddnewton merged commit 999292b into ruby-syntax-tree:main Oct 28, 2022
@eregon eregon deleted the truffleruby-ci branch October 28, 2022 13:59
@eregon eregon restored the truffleruby-ci branch October 28, 2022 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants