From ca92d1c042e59e64bf738639b98f2f43efff45bd Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 15 Aug 2026 20:58:44 +0200 Subject: [PATCH] Fixed tests for Ruby 2 --- testdata/ruby/basic_testcore.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testdata/ruby/basic_testcore.rb b/testdata/ruby/basic_testcore.rb index cf31ca417..30f44f5ee 100644 --- a/testdata/ruby/basic_testcore.rb +++ b/testdata/ruby/basic_testcore.rb @@ -3176,7 +3176,10 @@ class Basic_TestClass < TestBase assert_equal(RBA::A::var2s(RBA::DBox::new(0, 0, 10, 20)), "[dbox:(0,0;10,20)]") assert_equal(RBA::A::var2s([ 0.5, "hello" ]), "(##0.5,'hello')") assert_equal(RBA::A::var2s([ 0.5, [ 1, 2 ] ]), "(##0.5,(#1,#2))") - assert_equal(RBA::A::var2s({ 1 => 'one', 'two' => 17 }), "{#1=>'one','two'=>#17}") + if RUBY_VERSION > "2.0.0" + # Ruby 2 can't pass a hash to a function's argument + assert_equal(RBA::A::var2s({ 1 => 'one', 'two' => 17 }), "{#1=>'one','two'=>#17}") + end if RBA::A::l_size == 4 assert_equal(RBA::A::var2s(100000000000), "#l100000000000") else