diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
| commit | 8e011248465bae7b06203bc2c260432454bcac21 (patch) | |
| tree | 6ae42a518c1c5705b8f097668d2b83413da0b6ec /lib/irb | |
| parent | 50c355b12eac3ffa982fc60e96a8a272b6b4dff9 (diff) | |
| download | ruby-8e011248465bae7b06203bc2c260432454bcac21.tar.gz ruby-8e011248465bae7b06203bc2c260432454bcac21.tar.xz ruby-8e011248465bae7b06203bc2c260432454bcac21.zip | |
use Object#class instead of deprecated Object#type.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb')
| -rw-r--r-- | lib/irb/completion.rb | 2 | ||||
| -rw-r--r-- | lib/irb/context.rb | 2 | ||||
| -rw-r--r-- | lib/irb/init.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index a350013e8..30d60c244 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -157,7 +157,7 @@ module IRB select_message(receiver, message, candidates) else - candidates = eval("methods | private_methods | local_variables | type.constants", bind) + candidates = eval("methods | private_methods | local_variables | self.class.constants", bind) (candidates|ReservedWords).grep(/^#{Regexp.quote(input)}/) end diff --git a/lib/irb/context.rb b/lib/irb/context.rb index 1c504451c..a041a001e 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -164,7 +164,7 @@ module IRB end def file_input? - @io.type == FileInputMethod + @io.class == FileInputMethod end def inspect_mode=(opt) diff --git a/lib/irb/init.rb b/lib/irb/init.rb index f23815316..d883b7891 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -191,7 +191,7 @@ module IRB 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 @@ -208,7 +208,7 @@ module IRB begin require m rescue - print $@[0], ":", $!.type, ": ", $!, "\n" + print $@[0], ":", $!.class, ": ", $!, "\n" end end end |
