Skip to content

Commit

Permalink
Fix test for TruffleRuby (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis authored Jan 11, 2025
1 parent 9874a17 commit 8606c0c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/mini_racer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1089,8 +1089,12 @@ def test_regexp_string_iterator

def test_function_property
context = MiniRacer::Context.new
# regrettably loses the non-function properties
expected = {"error" => "Error: f() {} could not be cloned."}
if RUBY_ENGINE == "truffleruby"
expected = {"x" => 42}
else
# regrettably loses the non-function properties
expected = {"error" => "Error: f() {} could not be cloned."}
end
assert_equal expected, context.eval("({ x: 42, f() {} })")
end

Expand Down

0 comments on commit 8606c0c

Please sign in to comment.