あおきです。

  In mail "[ruby-list:33294] [PATCH] rdtool on ruby 1.4(.6)"
    Minero Aoki <aamine / mx.edit.ne.jp> wrote:

> RDtool 0.6.10 を ruby 1.4.6 に(再)対応させるパッチです。

失敗しました。rd2 へのパッチが抜けてたので出しなおします。
それと、rd2html しかテストしてません (latex とか man はしてない)。
-------------------------------------------------------------------
青木峰郎

diff -u rd2.org rd2 --- rd2.org Fri Jan 11 09:50:58 2002 +++ rd2 Fri Jan 11 12:28:44 2002 @@ -124,8 +124,8 @@ /(\w+)(?:\s*:\s*(\w+))?/, "include PART with Filter") do |src, part, filter| with_part.push([part, filter || part]) - unless include_path.index(RD::RDTree::TMP_DIR) - include_path.push(RD::RDTree::TMP_DIR) + unless include_path.index(RD::RDTree.tmp_dir) + include_path.push(RD::RDTree.tmp_dir) end end @@ -262,6 +262,6 @@ # filter: remove tmp file -Dir.glob("#{RD::RDTree::TMP_DIR}/rdtmp.#{$$}.*.*").each do |i| +Dir.glob("#{RD::RDTree.tmp_dir}/rdtmp.#{$$}.*.*").each do |i| File.delete(i) end diff -u rd/tree.rb.org rd/tree.rb --- rd/tree.rb.org Fri Jan 11 09:50:58 2002 +++ rd/tree.rb Fri Jan 11 10:55:29 2002 @@ -18,6 +18,11 @@ end TMP_DIR = "/tmp" + + def Tree.tmp_dir + TMP_DIR + end + attr_reader :root attr_reader :document_struct attr_accessor :include_paths diff -u version.rb.org version.rb --- rd/version.rb.org Fri Jan 11 09:50:58 2002 +++ rd/version.rb Fri Jan 11 10:47:33 2002 @@ -5,7 +5,7 @@ attr_reader :major, :minor, :patch_level def Version.new_from_version_string(name, version_str) - major, minor, patch_level, = analyze_version_string(version_str) + major, minor, patch_level, *dummy = analyze_version_string(version_str) return Version.new(name, major, minor, patch_level) end diff -u visitor.rb.org visitor.rb --- rd/visitor.rb.org Fri Jan 11 09:50:58 2002 +++ rd/visitor.rb Fri Jan 11 10:52:12 2002 @@ -24,16 +24,16 @@ def Visitor.define_visit_Nonterminal(element_type) eval <<-END_OF_EVAL - def visit_#{element_type}(element) - apply_to_#{element_type}(element, visit_children(element)) + def visit_#{element_type.id2name}(element) + apply_to_#{element_type.id2name}(element, visit_children(element)) end END_OF_EVAL end def Visitor.define_visit_Terminal(element_type) eval <<-END_OF_EVAL - def visit_#{element_type}(element) - apply_to_#{element_type}(element) + def visit_#{element_type.id2name}(element) + apply_to_#{element_type.id2name}(element) end END_OF_EVAL end