diff options
Diffstat (limited to 'jni/ruby/lib/irb/cmd/pushws.rb')
-rw-r--r-- | jni/ruby/lib/irb/cmd/pushws.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/jni/ruby/lib/irb/cmd/pushws.rb b/jni/ruby/lib/irb/cmd/pushws.rb new file mode 100644 index 0000000..1bda950 --- /dev/null +++ b/jni/ruby/lib/irb/cmd/pushws.rb @@ -0,0 +1,40 @@ +# +# change-ws.rb - +# $Release Version: 0.9.6$ +# $Revision: 47112 $ +# by Keiju ISHITSUKA(keiju@ruby-lang.org) +# +# -- +# +# +# + +require "irb/cmd/nop.rb" +require "irb/ext/workspaces.rb" + +# :stopdoc: +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 +# :startdoc: + |