1# 2# change-ws.rb - 3# $Release Version: 0.9.6$ 4# $Revision: 38358 $ 5# by Keiju ISHITSUKA(keiju@ruby-lang.org) 6# 7# -- 8# 9# 10# 11 12require "irb/cmd/nop.rb" 13require "irb/ext/workspaces.rb" 14 15# :stopdoc: 16module IRB 17 module ExtendCommand 18 class Workspaces<Nop 19 def execute(*obj) 20 irb_context.workspaces.collect{|ws| ws.main} 21 end 22 end 23 24 class PushWorkspace<Workspaces 25 def execute(*obj) 26 irb_context.push_workspace(*obj) 27 super 28 end 29 end 30 31 class PopWorkspace<Workspaces 32 def execute(*obj) 33 irb_context.pop_workspace(*obj) 34 super 35 end 36 end 37 end 38end 39# :startdoc: 40 41