1
0
Fork 0
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:
nobu 2002-10-02 16:45:35 +00:00
parent 8815306dc5
commit 29cef5f795
22 changed files with 91 additions and 93 deletions

View file

@ -629,7 +629,7 @@ Default options, which never appear in option summary.
end
end
def inc(*args)
type.inc(*args)
self.class.inc(*args)
end
=begin
@ -663,7 +663,7 @@ Default options, which never appear in option summary.
string pushed back to be first non-option argument
=end #'#"#`#
def terminate(arg = nil)
type.terminate(arg)
self.class.terminate(arg)
end
def self.terminate(arg = nil)
throw :terminate, arg
@ -1422,11 +1422,11 @@ Base class of exceptions from ((<OptionParser>))
end
def reason
@reason || self.type::Reason
@reason || self.class::Reason
end
def inspect
'#<' + type.to_s + ': ' + args.join(' ') + '>'
"#<#{self.class.to_s}: #{args.join(' ')}>"
end
def message