diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-13 10:04:26 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-13 10:04:26 +0000 |
commit | 59356f734385ee6a3ffcde6ce94eeb7ef7a7f721 (patch) | |
tree | 1885248614be4b5255951c709f7b4c3c9ec1ceb2 /lib/shell/command-processor.rb | |
parent | d8cf7990456ab1d1b96f44b42b6da97b56ec9bc9 (diff) |
merge revision(s) 20231:
* shell/command-processor.rb: undefined method `top_level_test' in
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@22279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/shell/command-processor.rb')
-rw-r--r-- | lib/shell/command-processor.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/shell/command-processor.rb b/lib/shell/command-processor.rb index ecf6c7d5eb..b0e4fb70db 100644 --- a/lib/shell/command-processor.rb +++ b/lib/shell/command-processor.rb @@ -155,6 +155,7 @@ class Shell # 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 @@ class Shell 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 |