From: rubikitch Date: 2003-12-22T08:09:54+09:00 Subject: [ruby-list:38917] rd2 cannot handle filter るびきちです。 Ruby1.8ではRDのfilter機能が動作しなかったのでパッチです。 拙作rd2html-extの一部の機能がRuby1.8では動作しなかった問題も、 これを当てれば動きます。 ruby 1.8.0 (2003-09-10) [i586-linux] RDtool -- rd2 0.6.13 # 0.6.14なのに(^^; RDtool Framework -- Document Tree 0.6.13 RDtool Framework -- Visitor 0.6.13 ruby 1.6.6 (2001-12-26) [i586-linux]では現状でも動作しています。 diff -u /tmp/rdtool-0.6.14/rd2 /home/rubikitch/compile/rdtool-0.6.14/rd2 --- /tmp/rdtool-0.6.14/rd2 2003-03-08 21:45:07.000000000 +0900 +++ /home/rubikitch/compile/rdtool-0.6.14/rd2 2003-12-22 08:01:49.000000000 +0900 @@ -124,7 +124,8 @@ # accept "PART:FILTER" and "PART" q.on("--with-part=PART", /(\w+)(?:\s*:\s*(\w+))?/, - "include PART with Filter") do |src, part, filter| + "include PART with Filter") do |x| + src, part, filter = x with_part.push([part, filter || part]) unless include_path.index(RD::RDTree.tmp_dir) include_path.push(RD::RDTree.tmp_dir)