diff --git a/ChangeLog b/ChangeLog index 8077531bde..b75638dfb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Aug 30 23:38:00 2008 Tanaka Akira + + * ext/dl/test/test_import.rb: fix character code. + + * ext/dl/test/test_func.rb: ditto. + Sat Aug 30 22:23:31 2008 Tadayoshi Funaba * rational.c: added a static variable for nurat_to_f. diff --git a/ext/dl/test/test_func.rb b/ext/dl/test/test_func.rb index 64a32d9565..887d38df95 100644 --- a/ext/dl/test/test_func.rb +++ b/ext/dl/test/test_func.rb @@ -15,9 +15,9 @@ module DL def test_isdigit() f = Function.new(CFunc.new(@libc['isdigit'], TYPE_INT, 'isdigit'), [TYPE_INT]) - r1 = f.call(?1) - r2 = f.call(?2) - rr = f.call(?r) + r1 = f.call(?1.ord) + r2 = f.call(?2.ord) + rr = f.call(?r.ord) assert_positive(r1) assert_positive(r2) assert_zero(rr) diff --git a/ext/dl/test/test_import.rb b/ext/dl/test/test_import.rb index f0694637eb..90f21dc65d 100644 --- a/ext/dl/test/test_import.rb +++ b/ext/dl/test/test_import.rb @@ -95,11 +95,11 @@ module DL def test_struct() s = LIBC::MyStruct.malloc() s.num = [0,1,2,3,4] - s.c = ?a + s.c = ?a.ord s.buff = "012345\377" assert_equal([0,1,2,3,4], s.num) - assert_equal(?a, s.c) - assert_equal([?0,?1,?2,?3,?4,?5,?\377], s.buff) + assert_equal(?a.ord, s.c) + assert_equal([?0.ord,?1.ord,?2.ord,?3.ord,?4.ord,?5.ord,?\377.ord], s.buff) end def test_gettimeofday() @@ -120,9 +120,9 @@ module DL end def test_isdigit() - r1 = LIBC.isdigit(?1) - r2 = LIBC.isdigit(?2) - rr = LIBC.isdigit(?r) + r1 = LIBC.isdigit(?1.ord) + r2 = LIBC.isdigit(?2.ord) + rr = LIBC.isdigit(?r.ord) assert_positive(r1) assert_positive(r2) assert_zero(rr)