[前][次][番号順一覧][スレッド一覧]

ruby-changes:2441

From: ko1@a...
Date: 15 Nov 2007 17:30:25 +0900
Subject: [ruby-changes:2441] akr - Ruby:r13932 (trunk): * tool/compile_prelude.rb: absolute path may not start with a slash.

akr	2007-11-15 17:30:07 +0900 (Thu, 15 Nov 2007)

  New Revision: 13932

  Modified files:
    trunk/ChangeLog
    trunk/tool/compile_prelude.rb

  Log:
    * tool/compile_prelude.rb: absolute path may not start with a slash.
      pointed by usa.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/tool/compile_prelude.rb?r1=13932&r2=13931
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13932&r2=13931

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13931)
+++ ChangeLog	(revision 13932)
@@ -1,3 +1,8 @@
+Thu Nov 15 17:28:21 2007  Tanaka Akira  <akr@f...>
+
+	* tool/compile_prelude.rb: absolute path may not start with a slash.
+	  pointed by usa.
+
 Thu Nov 15 17:07:54 2007  Tanaka Akira  <akr@f...>
 
 	* tool/compile_prelude.rb: fix first substitution.
@@ -2,2 +7,3 @@
 	  use constant for prefix.
+	  pointed by Richard Kilmer.
 
Index: tool/compile_prelude.rb
===================================================================
--- tool/compile_prelude.rb	(revision 13931)
+++ tool/compile_prelude.rb	(revision 13932)
@@ -33,8 +33,8 @@
       unless mkconf
         require 'rbconfig'
         mkconf = RbConfig::MAKEFILE_CONFIG.merge('prefix'=>'#{TMP_RUBY_PREFIX}')
-        exlen = $:.grep(%r{\A/}).last.length - RbConfig::CONFIG["prefix"].length
-        setup_ruby_prefix = "TMP_RUBY_PREFIX = $:.grep(%r{\\A/}).last[0..#{-exlen-1}]\n"
+        exlen = $:.reverse.find{|e|e!="."}.length - RbConfig::CONFIG["prefix"].length
+        setup_ruby_prefix = "TMP_RUBY_PREFIX = $:.reverse.find{|e|e!=\".\"}[0..#{-exlen-1}]\n"
         teardown_ruby_prefix = 'Object.class_eval { remove_const "TMP_RUBY_PREFIX" }'
       end
       if RbConfig::MAKEFILE_CONFIG.has_key? key

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]