summaryrefslogtreecommitdiff
path: root/lib/shell
diff options
context:
space:
mode:
Diffstat (limited to 'lib/shell')
-rw-r--r--lib/shell/command-processor.rb4
-rw-r--r--lib/shell/filter.rb6
-rw-r--r--lib/shell/system-command.rb4
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/shell/command-processor.rb b/lib/shell/command-processor.rb
index 459cf858d0..79310359e6 100644
--- a/lib/shell/command-processor.rb
+++ b/lib/shell/command-processor.rb
@@ -49,7 +49,7 @@ class Shell
rescue LoadError, Errno::ENOENT
rescue
print "load error: #{rc}\n"
- print $!.type, ": ", $!, "\n"
+ print $!.class, ": ", $!, "\n"
for err in $@[0, $@.size - 2]
print "\t", err, "\n"
end
@@ -277,7 +277,7 @@ class Shell
when IO
AppendIO.new(@shell, to, filter)
else
- Shell.Fail CanNotMethodApply, "append", to.type
+ Shell.Fail CanNotMethodApply, "append", to.class
end
end
diff --git a/lib/shell/filter.rb b/lib/shell/filter.rb
index 441cded221..727826b7c9 100644
--- a/lib/shell/filter.rb
+++ b/lib/shell/filter.rb
@@ -47,7 +47,7 @@ class Shell
self.input = src
self
else
- Filter.Fail CanNotMethodApply, "<", to.type
+ Filter.Fail CanNotMethodApply, "<", to.class
end
end
@@ -63,7 +63,7 @@ class Shell
when IO
each(){|l| to << l}
else
- Filter.Fail CanNotMethodApply, ">", to.type
+ Filter.Fail CanNotMethodApply, ">", to.class
end
self
end
@@ -72,7 +72,7 @@ class Shell
begin
Shell.cd(@shell.pwd).append(to, self)
rescue CanNotMethodApply
- Shell.Fail CanNotMethodApply, ">>", to.type
+ Shell.Fail CanNotMethodApply, ">>", to.class
end
end
diff --git a/lib/shell/system-command.rb b/lib/shell/system-command.rb
index c22b9ac0a4..6071c1c841 100644
--- a/lib/shell/system-command.rb
+++ b/lib/shell/system-command.rb
@@ -15,8 +15,8 @@ require "shell/filter"
class Shell
class SystemCommand < Filter
def initialize(sh, command, *opts)
- if t = opts.find{|opt| !opt.kind_of?(String) && opt.type}
- Shell.Fail TypeError, t.type, "String"
+ if t = opts.find{|opt| !opt.kind_of?(String) && opt.class}
+ Shell.Fail TypeError, t.class, "String"
end
super(sh)
@command = command