diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | instruby.rb | 13 |
2 files changed, 13 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Thu Jan 8 17:32:51 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * instruby.rb: should not depend on a library which does not exist + in 1.8. + Thu Jan 8 07:52:55 2009 Tanaka Akira <akr@fsij.org> * ext/socket/socket.c (init_unix_addrinfo): don't return a value. diff --git a/instruby.rb b/instruby.rb index 4edfe6e032..1dc1a847d3 100755 --- a/instruby.rb +++ b/instruby.rb @@ -284,8 +284,7 @@ install?(:doc, :rdoc) do if $rdocdir puts "installing rdoc" - ridatadir = RDoc::RI::Paths::SYSDIR - Config.expand(ridatadir) + ridatadir = File.join(CONFIG['datadir'], "ri", CONFIG['ruby_version'], "system") makedirs [ridatadir] install_recursive($rdocdir, ridatadir, :mode => $data_mode) end @@ -342,10 +341,10 @@ __END__ :endofruby EOF when "cmd" - "#{<<EOH}#{shebang}#{body}" + "#{<<"/EOH"}#{shebang}#{body}" @"%~dp0#{ruby_install_name}" -x "%~f0" %* @exit /b %ERRORLEVEL% -EOH +/EOH else shebang + body end @@ -411,7 +410,11 @@ end install?(:local, :comm, :gem) do puts "creating default gem directories" - directories = %w[cache doc gems specifications] + directories = open(File.join(srcdir, "lib/rubygems.rb")) do |f| + if f.grep(/^\s*DIRECTORIES\s*=\s*%w\[(.*?)\]/) + break $1.split + end + end gpath = CONFIG["sitelibdir"].sub(%r'/site_ruby/(?=[^/]+)', '/gems/') makedirs directories.collect {|dir| File.join(gpath, dir)} end |