summaryrefslogtreecommitdiff
path: root/lib/irb/extend-command.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-16 22:09:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-16 22:09:29 +0000
commit4d2f38b7778cd51cdf1e877d61dbb1ad2b028557 (patch)
tree37b44b95a3fbe5055110e7ac4853cf48df351234 /lib/irb/extend-command.rb
parente84ce31a9e6e82bc1980ac34eb2b8f246caf77c0 (diff)
* ext/readline/readline.c: suppress warnings.
* lib/irb/extend-command.rb (IRB::ContextExtender.def_extend_command): ditto. * lib/irb/ext/history.rb (IRB::Context::set_last_value): ditto. * lib/irb/ext/history.rb (IRB::Context::eval_history): ditto. * lib/irb/locale.rb (IRB::Locale::real_load): ditto. * lib/irb/slex.rb (SLex::Node::create_subnode): remove garbage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/extend-command.rb')
-rw-r--r--lib/irb/extend-command.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/irb/extend-command.rb b/lib/irb/extend-command.rb
index 491aa027ca..8e9b01673c 100644
--- a/lib/irb/extend-command.rb
+++ b/lib/irb/extend-command.rb
@@ -203,6 +203,7 @@ module IRB
def CE.def_extend_command(cmd_name, load_file, *aliases)
Context.module_eval %[
def #{cmd_name}(*opts, &b)
+ Context.module_eval {remove_method(:#{cmd_name})}
require "#{load_file}"
send :#{cmd_name}, *opts, &b
end