summaryrefslogtreecommitdiff
path: root/lib/shell/builtin-command.rb
diff options
context:
space:
mode:
-rw-r--r--lib/shell/builtin-command.rb31
1 files changed, 19 insertions, 12 deletions
@@ -1,9 +1,9 @@
#
# shell/builtin-command.rb -
-# $Release Version: 0.6.0 $
# $Revision$
# $Date$
-# by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd)
#
# --
#
@@ -22,6 +22,16 @@ class Shell
end
end
class Echo < BuiltInCommand
def initialize(sh, *strings)
super sh
@@ -58,20 +68,17 @@ class Shell
super sh
@pattern = pattern
- Thread.critical = true
- back = Dir.pwd
- begin
- Dir.chdir @shell.cwd
- @files = Dir[pattern]
- ensure
- Dir.chdir back
- Thread.critical = false
- end
end
def each(rs = nil)
rs = @shell.record_separator unless rs
- for f in @files
yield f+rs
end
end