mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
use Object#class instead of deprecated Object#type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8815306dc5
commit
29cef5f795
22 changed files with 91 additions and 93 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue