diff options
| author | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-07-09 11:17:17 +0000 |
|---|---|---|
| committer | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-07-09 11:17:17 +0000 |
| commit | 497c983ec22404888815570ccdd8df4693fa8e20 (patch) | |
| tree | 326cb343c08c55d2d93fa5223c01f940d3591f8b /lib/irb/cmd/pushws.rb | |
| parent | dd624bb82c9134a0cc273cb55d9950604823b3fa (diff) | |
| download | ruby-497c983ec22404888815570ccdd8df4693fa8e20.tar.gz ruby-497c983ec22404888815570ccdd8df4693fa8e20.tar.xz ruby-497c983ec22404888815570ccdd8df4693fa8e20.zip | |
* irb 0.9
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/cmd/pushws.rb')
| -rw-r--r-- | lib/irb/cmd/pushws.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/irb/cmd/pushws.rb b/lib/irb/cmd/pushws.rb new file mode 100644 index 000000000..0d8130d5c --- /dev/null +++ b/lib/irb/cmd/pushws.rb @@ -0,0 +1,39 @@ +# +# change-ws.rb - +# $Release Version: 0.9$ +# $Revision$ +# $Date$ +# by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd) +# +# -- +# +# +# + +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 + |
