[#39606] [Feature:trunk] Dir instance methods for relative path — Nobuyoshi Nakada <nobu@...>

なかだです。

15 messages 2009/11/02
[#39607] Re: [Feature:trunk] Dir instance methods for relative path — Yukihiro Matsumoto <matz@...> 2009/11/02

まつもと ゆきひろです

[#39611] Re: [Feature:trunk] Dir instance methods for relative path — KOSAKI Motohiro <kosaki.motohiro@...> 2009/11/02

kosakiです

[#39660] [Bug:trunk] Enumerator.new {|y| y << 1 << 2 << 3 } — Yusuke ENDOH <mame@...>

遠藤です。

14 messages 2009/11/11
[#39661] Re: [Bug:trunk] Enumerator.new {|y| y << 1 << 2 << 3 } — Tanaka Akira <akr@...> 2009/11/11

In article <e0b1e5700911110537u2aacf835pc0aea13d89a92cef@mail.gmail.com>,

[#39685] [Feature #2366] private constant — Yusuke Endoh <redmine@...>

Feature #2366: private constant

23 messages 2009/11/14
[#39689] [Feature #2366] private constant — Yusuke Endoh <redmine@...> 2009/11/14

チケット #2366 が更新されました。 (by Yusuke Endoh)

[#40207] Re: [Feature #2366] private constant — Yusuke ENDOH <mame@...> 2010/01/28

遠藤です。

[#40239] Re: [Feature #2366] private constant — Masatoshi SEKI <m_seki@...> 2010/01/29

=1B$B31$H$$$$$^$9!#=1B(B

[#40243] Re: [Feature #2366] private constant — Yusuke ENDOH <mame@...> 2010/01/29

遠藤です。

[#40246] Re: [Feature #2366] private constant — Masatoshi SEKI <m_seki@...> 2010/01/29

=1B$B31$H$$$$$^$9!#=1B(B

[#40247] Re: [Feature #2366] private constant — "NARUSE, Yui" <naruse@...> 2010/01/29

成瀬です。

[#39720] hidden objectって? — keiju@... (Keiju ISHITSUKA)

けいじゅ@いしつかです.

15 messages 2009/11/18
[#39721] Re: hidden objectって? — Yukihiro Matsumoto <matz@...> 2009/11/18

まつもと ゆきひろです

[#39726] Re: hidden objectって? — keiju@... (石塚圭樹) 2009/11/19

けいじゅ@いしつかです.

[#39727] Re: hidden objectって? — Yukihiro Matsumoto <matz@...> 2009/11/19

まつもと ゆきひろです

[#39730] Re: hidden objectって? — keiju@... (石塚圭樹) 2009/11/19

けいじゅ@いしつかです.

[#39735] [Bug:trunk] r25230 causes SEGV arround Marshal — "NARUSE, Yui" <naruse@...> 2009/11/19

以下のコミット以降、後述の現象が発生するそうです。

[#39755] RbConfig.rubybin — Tanaka Akira <akr@...>

ruby コマンドのパス名を返す RbConfig.rubybin というメソッド

18 messages 2009/11/23
[#39756] Re: RbConfig.rubybin — Kouhei Sutou <kou@...> 2009/11/23

須藤です。

[#39814] Re: RbConfig.rubybin — Tanaka Akira <akr@...> 2009/11/30

In article <20091123.123808.1122146273169400964.kou@cozmixng.org>,

[#39815] Re: RbConfig.rubybin — KOSAKI Motohiro <kosaki.motohiro@...> 2009/11/30

> In article <20091123.123808.1122146273169400964.kou@cozmixng.org>,

[#39796] バグ? ブロック引数で to_ary が呼ばれる必要のない場面で呼ばれる — keiju@... (Keiju ISHITSUKA)

けいじゅ@いしつかです.

14 messages 2009/11/27
[#39800] Re: バグ? ブロック引数で to_ary が呼ばれる必要のない場面で呼ばれる — Yukihiro Matsumoto <matz@...> 2009/11/27

まつもと ゆきひろです

[#39803] Re: バグ? ブロック引数で to_ary が呼ばれる必要のない場面で呼ばれる — keiju@... (石塚圭樹) 2009/11/27

けいじゅ@いしつかです.

[#39805] Re: バグ? ブロック引数で to_ary が呼ばれる必要のない場面で呼ばれる — Yukihiro Matsumoto <matz@...> 2009/11/28

まつもと ゆきひろです

[#39806] Re: バグ? ブロック引数で to_ary が呼ばれる必要のない場面で呼ばれる — keiju@... (石塚圭樹) 2009/11/28

けいじゅ@いしつかです.

[#39807] Re: バグ? ブロック引数で to_ary が呼ばれる必要のない場面で呼ばれる — Yukihiro Matsumoto <matz@...> 2009/11/28

まつもと ゆきひろです

[ruby-dev:39814] Re: RbConfig.rubybin

From: Tanaka Akira <akr@...>
Date: 2009-11-30 09:26:18 UTC
List: ruby-dev #39814
In article <20091123.123808.1122146273169400964.kou@cozmixng.org>,
  Kouhei Sutou <kou@cozmixng.org> writes:

> ただ、メソッド名はRbConfig.rubyの方がよい気がします。

ちょっとチャレンジな気がしますが、それもいいかも知れませんねぇ。

そうするとすると、こうでしょうか。

% svn diff --diff-cmd diff -x '-u -p'
Index: lib/webrick/httpservlet/cgihandler.rb
===================================================================
--- lib/webrick/httpservlet/cgihandler.rb	(revision 25955)
+++ lib/webrick/httpservlet/cgihandler.rb	(working copy)
@@ -17,9 +17,7 @@ module WEBrick
   module HTTPServlet
 
     class CGIHandler < AbstractServlet
-      Ruby = File::join(RbConfig::CONFIG['bindir'],
-                        RbConfig::CONFIG['ruby_install_name'])
-      Ruby << RbConfig::CONFIG['EXEEXT']
+      Ruby = RbConfig.ruby
       CGIRunner = "\"#{Ruby}\" \"#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb\""
 
       def initialize(server, name)
Index: benchmark/report.rb
===================================================================
--- benchmark/report.rb	(revision 25955)
+++ benchmark/report.rb	(working copy)
@@ -24,9 +24,7 @@ def exec_command type, file, w
 end
 
 def benchmark cmd
-  rubybin = ENV['RUBY'] || File.join(
-    RbConfig::CONFIG["bindir"],
-    RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
+  rubybin = ENV['RUBY'] || RbConfig.ruby
     
   IO.popen(rubybin, 'r+'){|io|
     io.write cmd
Index: benchmark/runc.rb
===================================================================
--- benchmark/runc.rb	(revision 25955)
+++ benchmark/runc.rb	(working copy)
@@ -5,9 +5,7 @@
 require 'benchmark'
 require 'rbconfig'
 
-$rubybin = ENV['RUBY'] || File.join(
-  RbConfig::CONFIG["bindir"],
-  RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
+$rubybin = ENV['RUBY'] || RbConfig.ruby
 
 def runfile file
   puts file
Index: tool/eval.rb
===================================================================
--- tool/eval.rb	(revision 25955)
+++ tool/eval.rb	(working copy)
@@ -3,9 +3,7 @@ require 'rbconfig'
 require 'fileutils'
 require 'pp'
 
-Ruby = ENV['RUBY'] ||
-  File.join(RbConfig::CONFIG["bindir"],
-            RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
+Ruby = ENV['RUBY'] || RbConfig.ruby
 #
 
 OPTIONS = %w{
Index: tool/mkconfig.rb
===================================================================
--- tool/mkconfig.rb	(revision 25955)
+++ tool/mkconfig.rb	(working copy)
@@ -201,6 +201,14 @@ print <<EOS
   CONFIG.each_value do |val|
     RbConfig::expand(val)
   end
+
+  # returns the absolute pathname of the ruby command.
+  def RbConfig.ruby
+    File.join(
+      RbConfig::CONFIG["bindir"],
+      RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
+    )
+  end
 end
 Config = RbConfig # compatibility for ruby-1.8.4 and older.
 CROSS_COMPILING = nil unless defined? CROSS_COMPILING
Index: test/ruby/envutil.rb
===================================================================
--- test/ruby/envutil.rb	(revision 25955)
+++ test/ruby/envutil.rb	(working copy)
@@ -22,10 +22,7 @@ module EnvUtil
     end
     begin
       require "rbconfig"
-      File.join(
-        RbConfig::CONFIG["bindir"],
-	RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
-      )
+      RbConfig.ruby
     rescue LoadError
       "ruby"
     end
-- 
[田中 哲][たなか あきら][Tanaka Akira]

In This Thread