Skip to content

Commit 8606c0c

Browse files
authored
Fix test for TruffleRuby (#334)
1 parent 9874a17 commit 8606c0c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/mini_racer_test.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,12 @@ def test_regexp_string_iterator
10891089

10901090
def test_function_property
10911091
context = MiniRacer::Context.new
1092-
# regrettably loses the non-function properties
1093-
expected = {"error" => "Error: f() {} could not be cloned."}
1092+
if RUBY_ENGINE == "truffleruby"
1093+
expected = {"x" => 42}
1094+
else
1095+
# regrettably loses the non-function properties
1096+
expected = {"error" => "Error: f() {} could not be cloned."}
1097+
end
10941098
assert_equal expected, context.eval("({ x: 42, f() {} })")
10951099
end
10961100

0 commit comments

Comments
 (0)