From 7fde2619633b123bbc60543c1d1fc3d212a4916c Mon Sep 17 00:00:00 2001 From: wanabe Date: Fri, 19 Mar 2010 16:39:16 +0000 Subject: [PATCH] * test/dl/test_cfunc.rb (test_to_s): a result of sprintf("%x", ptr) may contain 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dl/test_cfunc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dl/test_cfunc.rb b/test/dl/test_cfunc.rb index 28501f2c6d..209c8f3731 100644 --- a/test/dl/test_cfunc.rb +++ b/test/dl/test_cfunc.rb @@ -50,7 +50,7 @@ module DL def test_to_s s = @cf.to_s assert s.tainted?, 'to_s should be tainted' - assert_match(/ptr=#{sprintf("0x%x", @cf.ptr)}/, s) + assert_match(/ptr=#{sprintf("0x0*%x", @cf.ptr)}/, s) assert_match(/name='#{@cf.name}'/, s) assert_match(/type=#{@cf.ctype}/, s) end