From d464704f111d211c1f1ff9ef23ef1d755054be00 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Wed, 15 Aug 2007 19:08:43 +0000 Subject: add tag v1_8_5_54 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_5_54@12952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby_1_8_5/bin/rdoc | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 ruby_1_8_5/bin/rdoc (limited to 'ruby_1_8_5/bin/rdoc') diff --git a/ruby_1_8_5/bin/rdoc b/ruby_1_8_5/bin/rdoc new file mode 100644 index 0000000000..d08ce838f6 --- /dev/null +++ b/ruby_1_8_5/bin/rdoc @@ -0,0 +1,67 @@ +#!/usr/bin/env ruby +# +# RDoc: Documentation tool for source code +# (see lib/rdoc/rdoc.rb for more information) +# +# Copyright (c) 2003 Dave Thomas +# Released under the same terms as Ruby +# +# $Revision: 1.1 $ + +## Transitional Hack #### +# +# RDoc was initially distributed independently, and installed +# itself into /lib/ruby/site_ruby//rdoc... +# +# Now that RDoc is part of the distribution, it's installed into +# /lib/ruby/, which unfortunately appears later in the +# search path. This means that if you have previously installed RDoc, +# and then install from ruby-lang, you'll pick up the old one by +# default. This hack checks for the condition, and readjusts the +# search path if necessary. + +def adjust_for_existing_rdoc(path) + + $stderr.puts %{ + It seems as if you have a previously-installed RDoc in + the directory #{path}. + + Because this is now out-of-date, you might want to consider + removing the directories: + + #{File.join(path, "rdoc")} + + and + + #{File.join(path, "markup")} + + } + + # Move all the site_ruby directories to the end + p $: + $:.replace($:.partition {|path| /site_ruby/ !~ path}.flatten) + p $: +end + +$:.each do |path| + if /site_ruby/ =~ path + rdoc_path = File.join(path, 'rdoc', 'rdoc.rb') + if File.exists?(rdoc_path) + adjust_for_existing_rdoc(path) + break + end + end +end + +## End of Transitional Hack ## + + +require 'rdoc/rdoc' + +begin + r = RDoc::RDoc.new + r.document(ARGV) +rescue RDoc::RDocError => e + $stderr.puts e.message + exit(1) +end -- cgit v1.2.3