summaryrefslogtreecommitdiff
path: root/lib/irb/ext/use-loader.rb
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-13 05:22:30 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-13 05:22:30 +0000
commit89833152381b759482d5e0ae9dcbdd9ed29a2b6a (patch)
treeab615431bccab8bde95bb57d893ecea4b2bd4405 /lib/irb/ext/use-loader.rb
parent0ac361f54060a26f771d8751f06bbd1013db2016 (diff)
* lib/irb*: merge doc from doc/irb/ird.rd and improve overall
documentation of IRB * doc/irb/irb.rd: remove stale documentation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/ext/use-loader.rb')
-rw-r--r--lib/irb/ext/use-loader.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/irb/ext/use-loader.rb b/lib/irb/ext/use-loader.rb
index 64283b8989..913a64116f 100644
--- a/lib/irb/ext/use-loader.rb
+++ b/lib/irb/ext/use-loader.rb
@@ -18,6 +18,7 @@ class Object
end
module IRB
+ # :stopdoc:
module ExtendCommandBundle
def irb_load(*opts, &b)
ExtendCommand::Load.execute(irb_context, *opts, &b)
@@ -26,17 +27,25 @@ module IRB
ExtendCommand::Require.execute(irb_context, *opts, &b)
end
end
+ # :startdoc:
class Context
IRB.conf[:USE_LOADER] = false
+ # Returns whether +irb+'s own file reader method is used by
+ # +load+/+require+ or not.
+ #
+ # This mode is globally affected (irb-wide).
def use_loader
IRB.conf[:USE_LOADER]
end
alias use_loader? use_loader
+ # Sets IRB.conf[:USE_LOADER]
+ #
+ # See #use_loader for more information.
def use_loader=(opt)
if IRB.conf[:USE_LOADER] != opt