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

ruby-changes:8697

From: keiju <ko1@a...>
Date: Thu, 13 Nov 2008 14:57:39 +0900 (JST)
Subject: [ruby-changes:8697] Ruby:r20231 (ruby_1_8): * shell/command-processor.rb: undefined method `top_level_test' in

keiju	2008-11-13 14:55:27 +0900 (Thu, 13 Nov 2008)

  New Revision: 20231

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20231

  Log:
     * shell/command-processor.rb: undefined method `top_level_test' in
       Shell#test. [ruby-list:45634]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/lib/shell/command-processor.rb

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 20230)
+++ ruby_1_8/ChangeLog	(revision 20231)
@@ -1,3 +1,8 @@
+Thu Nov 13 14:51:34 2008  Keiju Ishitsuka  <keiju@r...>
+
+	* shell/command-processor.rb: undefined method `top_level_test' in
+  	  Shell#test. [ruby-list:45634]
+
 Wed Nov 12 03:49:42 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* eval.c (load_lock): makes circular require deadlock.
Index: ruby_1_8/lib/shell/command-processor.rb
===================================================================
--- ruby_1_8/lib/shell/command-processor.rb	(revision 20230)
+++ ruby_1_8/lib/shell/command-processor.rb	(revision 20231)
@@ -155,6 +155,7 @@
     #	  sh[:exists?, "foo"]
     #	  sh["exists?", "foo"]
     #	  
+    alias top_level_test test
     def test(command, file1, file2=nil)
       file1 = expand_path(file1)
       file2 = expand_path(file2) if file2
@@ -162,7 +163,11 @@
 
       case command
       when Integer
-	top_level_test(command, file1, file2)
+	if file2
+	  top_level_test(command, file1, file2)
+	else
+	  top_level_test(command, file1)
+	end
       when String
 	if command.size == 1
 	  if file2

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

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