diff --git a/test/fiddle/test_func.rb b/test/fiddle/test_func.rb index 8f7b0c2874..8517965223 100644 --- a/test/fiddle/test_func.rb +++ b/test/fiddle/test_func.rb @@ -38,7 +38,7 @@ module Fiddle def test_string stress, GC.stress = GC.stress, true f = Function.new(@libc['strcpy'], [TYPE_VOIDP, TYPE_VOIDP], TYPE_VOIDP) - buff = "000" + buff = +"000" str = f.call(buff, "123") assert_equal("123", buff) assert_equal("123", str.to_s) diff --git a/test/fiddle/test_function.rb b/test/fiddle/test_function.rb index 477b6a86dc..cbf84eae9d 100644 --- a/test/fiddle/test_function.rb +++ b/test/fiddle/test_function.rb @@ -60,13 +60,13 @@ module Fiddle func = Function.new(@libc['strcpy'], [TYPE_VOIDP, TYPE_VOIDP], TYPE_VOIDP) assert_nil Fiddle.last_error - func.call("000", "123") + func.call(+"000", "123") refute_nil Fiddle.last_error end def test_strcpy f = Function.new(@libc['strcpy'], [TYPE_VOIDP, TYPE_VOIDP], TYPE_VOIDP) - buff = "000" + buff = +"000" str = f.call(buff, "123") assert_equal("123", buff) assert_equal("123", str.to_s) diff --git a/test/fiddle/test_import.rb b/test/fiddle/test_import.rb index 0cd5e76a80..ff16d17d50 100644 --- a/test/fiddle/test_import.rb +++ b/test/fiddle/test_import.rb @@ -128,7 +128,7 @@ module Fiddle end def test_strcpy() - buff = "000" + buff = +"000" str = LIBC.strcpy(buff, "123") assert_equal("123", buff) assert_equal("123", str.to_s)