From: Koji Arai Date: 2003-08-03T15:25:22+09:00 Subject: [ruby-dev:21092] rubicon for ruby 1.8 新井です。 リリースも間近ですし、rubicon を試してみようと思ったのですが、 大量の warning はともかく、テストの失敗がかなり出ます。 ======================================================================== All Tests Test Results V0.3.5 ======================================================================== Name OK? Tests Asserts Failures Errors ------------------------------------------------------------ Rubicon::TestCase 0 0 AccessControl 3 18 : : : Time FAIL 41 1811 1 TrueClass 6 17 ======================================================================== All 71 files FAIL 917 19454 14 1 ======================================================================== まだ、rubicon は 1.8 対応しないのでしょうか?このままリリー スするのでしょうか? ChangeLog を見ると以下以降更新がないようです。 2003-04-12 Tanaka Akira * language/regexp.test: fix error message on `([a-[:digit:]]+)'. とりあえず、ちょっとだけパッチを作ったのですが、本当は、 Version.greater_than とかで分岐してあげないといけないことに あとで気が付きました。でも、このままだと間に合わないので投 げちゃいます。 Index: builtin/StringBase.rb =================================================================== RCS file: /usr/local/cvsup/ruby/rubicon/builtin/StringBase.rb,v retrieving revision 1.15 diff -u -r1.15 StringBase.rb --- builtin/StringBase.rb 16 Mar 2003 11:36:22 -0000 1.15 +++ builtin/StringBase.rb 3 Aug 2003 01:17:55 -0000 @@ -167,7 +167,7 @@ end def test_EQUAL # '==' - assert_equal(false, S("foo") == :foo) + assert_equal(nil, S("foo") == :foo) assert(S("abcdef") == S("abcdef")) pre_1_7_1 do Index: builtin/TestKernel.rb =================================================================== RCS file: /usr/local/cvsup/ruby/rubicon/builtin/TestKernel.rb,v retrieving revision 1.40 diff -u -r1.40 TestKernel.rb --- builtin/TestKernel.rb 16 Mar 2003 11:36:22 -0000 1.40 +++ builtin/TestKernel.rb 3 Aug 2003 01:12:47 -0000 @@ -422,8 +422,8 @@ end def test_singleton_methods - assert_equal(%w(singleton), MethodsTest.singleton_methods) - assert_equal(%w(singleton), PrivateMethods.singleton_methods) + assert_equal(%w(singleton), MethodsTest.singleton_methods(false)) + assert_equal(%w(singleton), PrivateMethods.singleton_methods(true)) mt = MethodsTest.new assert_equal([], mt.singleton_methods) Index: builtin/TestMath.rb =================================================================== RCS file: /usr/local/cvsup/ruby/rubicon/builtin/TestMath.rb,v retrieving revision 1.4 diff -u -r1.4 TestMath.rb --- builtin/TestMath.rb 7 Feb 2003 06:51:08 -0000 1.4 +++ builtin/TestMath.rb 3 Aug 2003 01:09:14 -0000 @@ -115,9 +115,9 @@ end # and some special cases - assert_equal(-1, Math.log(0).infinite?) - assert_equal(-1, Math.log10(0).infinite?) - assert_exception(ArgumentError) { Math.sqrt(-1) } + assert_exception(Errno::ERANGE) { Math.log(0) } + assert_exception(Errno::ERANGE) { Math.log10(0) } + assert_exception(Errno::EDOM) { Math.sqrt(-1) } end end Index: builtin/TestProc.rb =================================================================== RCS file: /usr/local/cvsup/ruby/rubicon/builtin/TestProc.rb,v retrieving revision 1.7 diff -u -r1.7 TestProc.rb --- builtin/TestProc.rb 5 Jan 2002 14:35:05 -0000 1.7 +++ builtin/TestProc.rb 3 Aug 2003 01:20:52 -0000 @@ -31,7 +31,8 @@ Version.greater_than("1.6.1") do tests << [Proc.new { || }, 0] << - [Proc.new { |x| }, -1] + [Proc.new { |x| }, 1] << + [Proc.new { |*x| }, -1] end tests.each do |proc, expected_arity| Index: builtin/TestTime.rb =================================================================== RCS file: /usr/local/cvsup/ruby/rubicon/builtin/TestTime.rb,v retrieving revision 1.17 diff -u -r1.17 TestTime.rb --- builtin/TestTime.rb 16 Mar 2003 11:36:22 -0000 1.17 +++ builtin/TestTime.rb 3 Aug 2003 01:16:13 -0000 @@ -407,7 +407,7 @@ def test_s_at t = Time.now sec = t.to_i - assert_equal(0, Time.at(0)) + assert_not_equal(0, Time.at(0)) assert_equal(t, Time.at(t)) assert((Time.at(sec,1000000).to_f - Time.at(sec).to_f) == 1.0) end -- 新井康司 (Koji Arai)