diff options
Diffstat (limited to 'lib/irb/cmd')
-rw-r--r-- | lib/irb/cmd/chws.rb | 6 | ||||
-rw-r--r-- | lib/irb/cmd/fork.rb | 28 | ||||
-rw-r--r-- | lib/irb/cmd/load.rb | 50 | ||||
-rw-r--r-- | lib/irb/cmd/nop.rb | 10 | ||||
-rw-r--r-- | lib/irb/cmd/pushws.rb | 10 | ||||
-rw-r--r-- | lib/irb/cmd/subirb.rb | 8 |
6 files changed, 56 insertions, 56 deletions
diff --git a/lib/irb/cmd/chws.rb b/lib/irb/cmd/chws.rb index 1889e75d5e..8c0260627e 100644 --- a/lib/irb/cmd/chws.rb +++ b/lib/irb/cmd/chws.rb @@ -18,14 +18,14 @@ module IRB class CurrentWorkingWorkspace<Nop def execute(*obj) - irb_context.main + irb_context.main end end class ChangeWorkspace<Nop def execute(*obj) - irb_context.change_workspace(*obj) - irb_context.main + irb_context.change_workspace(*obj) + irb_context.main end end end diff --git a/lib/irb/cmd/fork.rb b/lib/irb/cmd/fork.rb index fbe5126c85..e74b2485c0 100644 --- a/lib/irb/cmd/fork.rb +++ b/lib/irb/cmd/fork.rb @@ -16,20 +16,20 @@ module IRB module ExtendCommand class Fork<Nop def execute - 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 + 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 diff --git a/lib/irb/cmd/load.rb b/lib/irb/cmd/load.rb index 6c9e9f67ce..1b6dee6918 100644 --- a/lib/irb/cmd/load.rb +++ b/lib/irb/cmd/load.rb @@ -19,8 +19,8 @@ module IRB include IrbLoader def execute(file_name, priv = nil) -# return ruby_load(file_name) unless IRB.conf[:USE_LOADER] - return irb_load(file_name, priv) + # return ruby_load(file_name) unless IRB.conf[:USE_LOADER] + return irb_load(file_name, priv) end end @@ -28,38 +28,38 @@ module IRB include IrbLoader def execute(file_name) -# return ruby_require(file_name) unless IRB.conf[:USE_LOADER] + # 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} + 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 + 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 + 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) + source_file(file_name) end end end diff --git a/lib/irb/cmd/nop.rb b/lib/irb/cmd/nop.rb index 7bd443121e..880bfb8137 100644 --- a/lib/irb/cmd/nop.rb +++ b/lib/irb/cmd/nop.rb @@ -16,22 +16,22 @@ module IRB @RCS_ID='-$Id$-' def self.execute(conf, *opts) - command = new(conf) - command.execute(*opts) + command = new(conf) + command.execute(*opts) end def initialize(conf) - @irb_context = conf + @irb_context = conf end attr_reader :irb_context def irb - @irb_context.irb + @irb_context.irb end def execute(*opts) - #nop + #nop end end end diff --git a/lib/irb/cmd/pushws.rb b/lib/irb/cmd/pushws.rb index cee8538e3e..0726a4377e 100644 --- a/lib/irb/cmd/pushws.rb +++ b/lib/irb/cmd/pushws.rb @@ -17,21 +17,21 @@ module IRB module ExtendCommand class Workspaces<Nop def execute(*obj) - irb_context.workspaces.collect{|ws| ws.main} + irb_context.workspaces.collect{|ws| ws.main} end end class PushWorkspace<Workspaces def execute(*obj) - irb_context.push_workspace(*obj) - super + irb_context.push_workspace(*obj) + super end end class PopWorkspace<Workspaces def execute(*obj) - irb_context.pop_workspace(*obj) - super + irb_context.pop_workspace(*obj) + super end end end diff --git a/lib/irb/cmd/subirb.rb b/lib/irb/cmd/subirb.rb index 7363d64769..ccf4fc4bcd 100644 --- a/lib/irb/cmd/subirb.rb +++ b/lib/irb/cmd/subirb.rb @@ -16,25 +16,25 @@ module IRB module ExtendCommand class IrbCommand<Nop def execute(*obj) - IRB.irb(nil, *obj) + IRB.irb(nil, *obj) end end class Jobs<Nop def execute - IRB.JobManager + IRB.JobManager end end class Foreground<Nop def execute(key) - IRB.JobManager.switch(key) + IRB.JobManager.switch(key) end end class Kill<Nop def execute(*keys) - IRB.JobManager.kill(*keys) + IRB.JobManager.kill(*keys) end end end |