aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/context.rb
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-21 17:08:24 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-21 17:08:24 +0000
commit4da6fa28f884329e04b3916565b6ba674705345a (patch)
tree04c3e1f6dbf63468f026601c48514ac9f9af8b21 /lib/irb/context.rb
parent75584a1d8672d99ec658744330a13fafeb13a806 (diff)
downloadruby-4da6fa28f884329e04b3916565b6ba674705345a.tar.gz
* lib/irb/inspector.rb, lib/irb/context.rb: Move IRB::INSPECTORS and
class methods to IRB::Inspector [ruby-core:51067][Bug #7598] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/context.rb')
-rw-r--r--lib/irb/context.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb
index cd191d253e..43d5364b4f 100644
--- a/lib/irb/context.rb
+++ b/lib/irb/context.rb
@@ -286,7 +286,7 @@ module IRB
# +nil+:: inspect mode in non-math mode,
# non-inspect mode in math mode
#
- # See IRB::INSPECTORS for more information.
+ # See IRB::Inspector for more information.
#
# Can also be set using the +--inspect+ and +--noinspect+ command line
# options.
@@ -294,16 +294,16 @@ module IRB
# See IRB@Command+line+options for more command line options.
def inspect_mode=(opt)
- if i = INSPECTORS[opt]
+ if i = Inspector::INSPECTORS[opt]
@inspect_mode = opt
@inspect_method = i
i.init
else
case opt
when nil
- if INSPECTORS.keys_with_inspector(INSPECTORS[true]).include?(@inspect_mode)
+ if Inspector.keys_with_inspector(Inspector::INSPECTORS[true]).include?(@inspect_mode)
self.inspect_mode = false
- elsif INSPECTORS.keys_with_inspector(INSPECTORS[false]).include?(@inspect_mode)
+ elsif Inspector.keys_with_inspector(Inspector::INSPECTORS[false]).include?(@inspect_mode)
self.inspect_mode = true
else
puts "Can't switch inspect mode."
@@ -322,10 +322,10 @@ module IRB
when Inspector
prefix = "usr%d"
i = 1
- while INSPECTORS[format(prefix, i)]; i += 1; end
+ while Inspector::INSPECTORS[format(prefix, i)]; i += 1; end
@inspect_mode = format(prefix, i)
@inspect_method = opt
- INSPECTORS.def_inspector(format(prefix, i), @inspect_method)
+ Inspector.def_inspector(format(prefix, i), @inspect_method)
else
puts "Can't switch inspect mode(#{opt})."
return