From f0e0b77864d3222b838d3e3074e728bd0d3f75f6 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Tue, 10 Nov 2009 22:51:24 +0000 Subject: * test/dl/test_func.rb (test_strtod): strtod test should not rely on memory layout git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dl/test_func.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dl/test_func.rb b/test/dl/test_func.rb index 512c22851e..86ac6301a4 100644 --- a/test/dl/test_func.rb +++ b/test/dl/test_func.rb @@ -33,8 +33,8 @@ module DL def test_strtod() f = Function.new(CFunc.new(@libc['strtod'], TYPE_DOUBLE, 'strtod'), [TYPE_VOIDP, TYPE_VOIDP]) - buff1 = "12.34" - buff2 = " " + buff1 = CPtr["12.34"] + buff2 = buff1 + 4 r = f.call(buff1, buff2) assert_match(12.00..13.00, r) end -- cgit v1.2.3