diff options
Diffstat (limited to 'ruby_1_8_6/lib/irb/cmd')
-rw-r--r-- | ruby_1_8_6/lib/irb/cmd/chws.rb | 33 | ||||
-rw-r--r-- | ruby_1_8_6/lib/irb/cmd/fork.rb | 39 | ||||
-rw-r--r-- | ruby_1_8_6/lib/irb/cmd/help.rb | 34 | ||||
-rw-r--r-- | ruby_1_8_6/lib/irb/cmd/load.rb | 67 | ||||
-rw-r--r-- | ruby_1_8_6/lib/irb/cmd/nop.rb | 39 | ||||
-rw-r--r-- | ruby_1_8_6/lib/irb/cmd/pushws.rb | 39 | ||||
-rw-r--r-- | ruby_1_8_6/lib/irb/cmd/subirb.rb | 43 |
7 files changed, 0 insertions, 294 deletions
diff --git a/ruby_1_8_6/lib/irb/cmd/chws.rb b/ruby_1_8_6/lib/irb/cmd/chws.rb deleted file mode 100644 index 88585b778b..0000000000 --- a/ruby_1_8_6/lib/irb/cmd/chws.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# change-ws.rb - -# $Release Version: 0.9.5$ -# $Revision$ -# $Date$ -# by Keiju ISHITSUKA(keiju@ruby-lang.org) -# -# -- -# -# -# - -require "irb/cmd/nop.rb" -require "irb/ext/change-ws.rb" - -module IRB - module ExtendCommand - - class CurrentWorkingWorkspace<Nop - def execute(*obj) - irb_context.main - end - end - - class ChangeWorkspace<Nop - def execute(*obj) - irb_context.change_workspace(*obj) - irb_context.main - end - end - end -end - diff --git a/ruby_1_8_6/lib/irb/cmd/fork.rb b/ruby_1_8_6/lib/irb/cmd/fork.rb deleted file mode 100644 index 2866b1373b..0000000000 --- a/ruby_1_8_6/lib/irb/cmd/fork.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# fork.rb - -# $Release Version: 0.9.5 $ -# $Revision$ -# $Date$ -# by Keiju ISHITSUKA(keiju@ruby-lang.org) -# -# -- -# -# -# - -@RCS_ID='-$Id$-' - - -module IRB - module ExtendCommand - class Fork<Nop - def execute(&block) - pid = send ExtendCommand.irb_original_method_name("fork") - unless pid - class<<self - alias_method :exit, ExtendCommand.irb_original_method_name('exit') - end - if iterator? - begin - yield - ensure - exit - end - end - end - pid - end - end - end -end - - diff --git a/ruby_1_8_6/lib/irb/cmd/help.rb b/ruby_1_8_6/lib/irb/cmd/help.rb deleted file mode 100644 index 3e8d1388e0..0000000000 --- a/ruby_1_8_6/lib/irb/cmd/help.rb +++ /dev/null @@ -1,34 +0,0 @@ -# -# help.rb - helper using ri -# $Release Version: 0.9.5$ -# $Revision$ -# $Date$ -# -# -- -# -# -# - -require 'rdoc/ri/ri_driver' - -module IRB - module ExtendCommand - module Help - begin - @ri = RiDriver.new - rescue SystemExit - else - def self.execute(context, *names) - names.each do |name| - begin - @ri.get_info_for(name.to_s) - rescue RiError - puts $!.message - end - end - nil - end - end - end - end -end diff --git a/ruby_1_8_6/lib/irb/cmd/load.rb b/ruby_1_8_6/lib/irb/cmd/load.rb deleted file mode 100644 index cbc5d91d03..0000000000 --- a/ruby_1_8_6/lib/irb/cmd/load.rb +++ /dev/null @@ -1,67 +0,0 @@ -# -# load.rb - -# $Release Version: 0.9.5$ -# $Revision$ -# $Date$ -# by Keiju ISHITSUKA(keiju@ruby-lang.org) -# -# -- -# -# -# - -require "irb/cmd/nop.rb" -require "irb/ext/loader" - -module IRB - module ExtendCommand - class Load<Nop - include IrbLoader - - def execute(file_name, priv = nil) -# return ruby_load(file_name) unless IRB.conf[:USE_LOADER] - return irb_load(file_name, priv) - end - end - - class Require<Nop - include IrbLoader - - def execute(file_name) -# return ruby_require(file_name) unless IRB.conf[:USE_LOADER] - - rex = Regexp.new("#{Regexp.quote(file_name)}(\.o|\.rb)?") - return false if $".find{|f| f =~ rex} - - case file_name - when /\.rb$/ - begin - if irb_load(file_name) - $".push file_name - return true - end - rescue LoadError - end - when /\.(so|o|sl)$/ - return ruby_require(file_name) - end - - begin - irb_load(f = file_name + ".rb") - $".push f - return true - rescue LoadError - return ruby_require(file_name) - end - end - end - - class Source<Nop - include IrbLoader - def execute(file_name) - source_file(file_name) - end - end - end - -end diff --git a/ruby_1_8_6/lib/irb/cmd/nop.rb b/ruby_1_8_6/lib/irb/cmd/nop.rb deleted file mode 100644 index aa553c959e..0000000000 --- a/ruby_1_8_6/lib/irb/cmd/nop.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# nop.rb - -# $Release Version: 0.9.5$ -# $Revision$ -# $Date$ -# by Keiju ISHITSUKA(keiju@ruby-lang.org) -# -# -- -# -# -# -module IRB - module ExtendCommand - class Nop - - @RCS_ID='-$Id$-' - - def self.execute(conf, *opts) - command = new(conf) - command.execute(*opts) - end - - def initialize(conf) - @irb_context = conf - end - - attr_reader :irb_context - - def irb - @irb_context.irb - end - - def execute(*opts) - #nop - end - end - end -end - diff --git a/ruby_1_8_6/lib/irb/cmd/pushws.rb b/ruby_1_8_6/lib/irb/cmd/pushws.rb deleted file mode 100644 index eddaeae631..0000000000 --- a/ruby_1_8_6/lib/irb/cmd/pushws.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# change-ws.rb - -# $Release Version: 0.9.5$ -# $Revision$ -# $Date$ -# by Keiju ISHITSUKA(keiju@ruby-lang.org) -# -# -- -# -# -# - -require "irb/cmd/nop.rb" -require "irb/ext/workspaces.rb" - -module IRB - module ExtendCommand - class Workspaces<Nop - def execute(*obj) - irb_context.workspaces.collect{|ws| ws.main} - end - end - - class PushWorkspace<Workspaces - def execute(*obj) - irb_context.push_workspace(*obj) - super - end - end - - class PopWorkspace<Workspaces - def execute(*obj) - irb_context.pop_workspace(*obj) - super - end - end - end -end - diff --git a/ruby_1_8_6/lib/irb/cmd/subirb.rb b/ruby_1_8_6/lib/irb/cmd/subirb.rb deleted file mode 100644 index 79d654b172..0000000000 --- a/ruby_1_8_6/lib/irb/cmd/subirb.rb +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/local/bin/ruby -# -# multi.rb - -# $Release Version: 0.9.5$ -# $Revision$ -# $Date$ -# by Keiju ISHITSUKA(keiju@ruby-lang.org) -# -# -- -# -# -# - -require "irb/cmd/nop.rb" -require "irb/ext/multi-irb" - -module IRB - module ExtendCommand - class IrbCommand<Nop - def execute(*obj) - IRB.irb(nil, *obj) - end - end - - class Jobs<Nop - def execute - IRB.JobManager - end - end - - class Foreground<Nop - def execute(key) - IRB.JobManager.switch(key) - end - end - - class Kill<Nop - def execute(*keys) - IRB.JobManager.kill(*keys) - end - end - end -end |