summaryrefslogtreecommitdiff
path: root/lib/shell/builtin-command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
commit7bbf2f308580f468802cd7d32c94fce1b9f1779e (patch)
tree0a680f59e70a78d60e776d7b763e618fb2fec624 /lib/shell/builtin-command.rb
parent34276148c4450faa77bb298cfbe005f7c263f802 (diff)
* lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/shell/builtin-command.rb')
-rw-r--r--lib/shell/builtin-command.rb62
1 files changed, 31 insertions, 31 deletions
diff --git a/lib/shell/builtin-command.rb b/lib/shell/builtin-command.rb
index e489da4eca..f0e064e435 100644
--- a/lib/shell/builtin-command.rb
+++ b/lib/shell/builtin-command.rb
@@ -1,8 +1,8 @@
#
# shell/builtin-command.rb -
-# $Release Version: 0.7 $
-# $Revision$
-# by Keiju ISHITSUKA(keiju@ruby-lang.org)
+# $Release Version: 0.7 $
+# $Revision$
+# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
@@ -40,7 +40,7 @@ class Shell
def each(rs = nil)
rs = @shell.record_separator unless rs
for str in @strings
- yield str + rs
+ yield str + rs
end
end
end
@@ -53,11 +53,11 @@ class Shell
def each(rs = nil)
if @cat_files.empty?
- super
+ super
else
- for src in @cat_files
- @shell.foreach(src, rs){|l| yield l}
- end
+ for src in @cat_files
+ @shell.foreach(src, rs){|l| yield l}
+ end
end
end
end
@@ -71,31 +71,31 @@ class Shell
def each(rs = nil)
if @pattern[0] == ?/
- @files = Dir[@pattern]
+ @files = Dir[@pattern]
else
- prefix = @shell.pwd+"/"
- @files = Dir[prefix+@pattern].collect{|p| p.sub(prefix, "")}
+ prefix = @shell.pwd+"/"
+ @files = Dir[prefix+@pattern].collect{|p| p.sub(prefix, "")}
end
rs = @shell.record_separator unless rs
for f in @files
- yield f+rs
+ yield f+rs
end
end
end
-# class Sort < Cat
-# def initialize(sh, *filenames)
-# super
-# end
-#
-# def each(rs = nil)
-# ary = []
-# super{|l| ary.push l}
-# for l in ary.sort!
-# yield l
-# end
-# end
-# end
+ # class Sort < Cat
+ # def initialize(sh, *filenames)
+ # super
+ # end
+ #
+ # def each(rs = nil)
+ # ary = []
+ # super{|l| ary.push l}
+ # for l in ary.sort!
+ # yield l
+ # end
+ # end
+ # end
class AppendIO < BuiltInCommand
def initialize(sh, io, filter)
@@ -107,7 +107,7 @@ class Shell
def input=(filter)
@input.input=filter
for l in @input
- @io << l
+ @io << l
end
end
@@ -122,9 +122,9 @@ class Shell
def input=(filter)
begin
- super
+ super
ensure
- @io.close
+ @io.close
end
end
end
@@ -138,9 +138,9 @@ class Shell
def each(rs = nil)
to = @shell.open(@to_filename, "w")
begin
- super{|l| to << l; yield l}
+ super{|l| to << l; yield l}
ensure
- to.close
+ to.close
end
end
end
@@ -153,7 +153,7 @@ class Shell
def each(rs = nil)
while job = @jobs.shift
- job.each{|l| yield l}
+ job.each{|l| yield l}
end
end
end