[#28230] bcc32 memory manager — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

15 messages 2006/01/18

[#28243] FUNCTION_CALL_MAY_RETURN_TWICE — Hajimu UMEMOTO <ume@...>

梅本です。

18 messages 2006/01/20

[#28270] Re: [PATCH] solaris 10 isinf and ruby_setenv fixes — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

17 messages 2006/01/23
[#28271] Re: [PATCH] solaris 10 isinf and ruby_setenv fixes — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2006/01/23

山本です。

[#28272] Re: [PATCH] solaris 10 isinf and ruby_setenv fixes — WATANABE Hirofumi <eban@...> 2006/01/23

わたなべです。

[#28273] Re: [PATCH] solaris 10 isinf and ruby_setenv fixes — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2006/01/23

山本です。

[#28274] Re: [PATCH] solaris 10 isinf and ruby_setenv fixes — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2006/01/24

山本です。

[#28275] Re: [PATCH] solaris 10 isinf and ruby_setenv fixes — "U.Nakamura" <usa@...> 2006/01/24

こんにちは、なかむら(う)です。

[#28286] SEGV with zlib — Tanaka Akira <akr@...17n.org>

最近、Data オブジェクトの free 関数が気になっているのですが、

24 messages 2006/01/30
[#28303] Re: SEGV with zlib — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2006/02/06

山本です。

[#28304] Re: SEGV with zlib — Yukihiro Matsumoto <matz@...> 2006/02/06

まつもと ゆきひろです

[#28305] Re: SEGV with zlib — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2006/02/06

山本です。

[#28306] Re: SEGV with zlib — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2006/02/06

山本です。

[#28307] Re: SEGV with zlib — Tietew <tietew-ml-ruby-dev@...> 2006/02/06

[#28308] Re: SEGV with zlib — Yukihiro Matsumoto <matz@...> 2006/02/06

まつもとゆきひろです。

[ruby-dev:28258] -- option of testrb (LoadError)

From: Go Noguchi <gonoguti@...>
Date: 2006-01-21 15:13:36 UTC
List: ruby-dev #28258
はじめまして、野口と申します。

testrbで実行するテストスクリプト内でコマンドラインオプションを使おうと
思い、testrbの'--'オプションを利用したのですが、以下のように
LoadErrorになってしまいます。

$ ruby -vS testrb test_foo.rb -- -f
ruby 1.8.4 (2006-01-19) [i386-freebsd5.3]
/home/ruby/test/test_foo.rb:-f option specified.
/home/ruby/local/lib/ruby/1.8/test/unit/collector/dir.rb:83:in `require': no such file to load -- -f (LoadError)
        from /home/ruby/local/lib/ruby/1.8/test/unit/collector/dir.rb:83:in `collect_file'
        from /home/ruby/local/lib/ruby/1.8/test/unit/collector/dir.rb:70:in `recursive_collect'
        from /home/ruby/local/lib/ruby/1.8/test/unit/collector/dir.rb:30:in `collect'
        from /home/ruby/local/lib/ruby/1.8/test/unit/collector/dir.rb:29:in `collect'
        from /home/ruby/local/lib/ruby/1.8/test/unit/autorunner.rb:67
        from /home/ruby/local/lib/ruby/1.8/test/unit/autorunner.rb:198:in `run'
        from /home/ruby/local/bin/testrb:5

$ cat test_foo.rb
require 'test/unit'
require 'optparse'
class TestFoo < Test::Unit::TestCase
  def test_foo
  end
end
o = OptionParser.new
o.on("-f"){puts "#{__FILE__}:-f option specified."}
o.parse!

どうやら'--'以降のオプションがファイルとして
Test::Unit::Collector::Dirに渡されているのが原因のようです。

以下のパッチでうまくいくようなので問題がなければ
取り込んでいただければ幸いです。

Index: lib/test/unit/autorunner.rb
===================================================================
RCS file: /home/ruby/CVS/ruby/lib/test/unit/autorunner.rb,v
retrieving revision 1.8.2.3
diff -u -r1.8.2.3 autorunner.rb
--- lib/test/unit/autorunner.rb 17 Feb 2005 02:56:46 -0000      1.8.2.3
+++ lib/test/unit/autorunner.rb 21 Jan 2006 12:57:28 -0000
@@ -85,7 +85,7 @@

       def process_args(args = ARGV)
         begin
-          @to_run.concat options.parse!(args)
+          options.order!(args){|arg| @to_run << arg}
         rescue OptionParser::ParseError => e
           puts e
           puts options

---
GO Noguchi<gonoguti@yahoo.co.jp>

In This Thread

Prev Next