summaryrefslogtreecommitdiff
path: root/lib/irb/workspace-binding.rb
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-04-30 20:37:16 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-04-30 20:37:16 +0000
commit902524c35b84e6473498969ee89181052a92da5c (patch)
treeaff616f3d8e360d44cc80891b1396fc83a533579 /lib/irb/workspace-binding.rb
parent30a7496b225cc38f0e704f780bd19c4c64bf90a4 (diff)
These files are also obsoleted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/workspace-binding.rb')
-rw-r--r--lib/irb/workspace-binding.rb77
1 files changed, 0 insertions, 77 deletions
diff --git a/lib/irb/workspace-binding.rb b/lib/irb/workspace-binding.rb
deleted file mode 100644
index d58088d9dd9..00000000000
--- a/lib/irb/workspace-binding.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# workspace-binding.rb -
-# $Release Version: $
-# $Revision$
-# $Date$
-# by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd)
-#
-# --
-#
-#
-#
-
-
-module IRB
- # create new workspace.
- def IRB.workspace_binding(*main)
- if @CONF[:SINGLE_IRB]
- bind = TOPLEVEL_BINDING
- else
- case @CONF[:CONTEXT_MODE]
- when 0
- bind = eval("proc{binding}.call",
- TOPLEVEL_BINDING,
- "(irb_local_binding)",
- 1)
- when 1
- require "tempfile"
- f = Tempfile.open("irb-binding")
- f.print <<EOF
- $binding = binding
-EOF
- f.close
- load f.path
- bind = $binding
-
- when 2
- unless defined? BINDING_QUEUE
- require "thread"
-
- IRB.const_set("BINDING_QUEUE", SizedQueue.new(1))
- Thread.abort_on_exception = true
- Thread.start do
- eval "require \"irb/workspace-binding-2\"", TOPLEVEL_BINDING, __FILE__, __LINE__
- end
- Thread.pass
-
- end
-
- bind = BINDING_QUEUE.pop
-
- when 3
- bind = eval("def irb_binding; binding; end; irb_binding",
- TOPLEVEL_BINDING,
- __FILE__,
- __LINE__ - 3)
- end
- end
- unless main.empty?
- @CONF[:__MAIN__] = main[0]
- case main[0]
- when Module
- bind = eval("IRB.conf[:__MAIN__].module_eval('binding')", bind)
- else
- begin
- bind = eval("IRB.conf[:__MAIN__].instance_eval('binding')", bind)
- rescue TypeError
- IRB.fail CanNotChangeBinding, main[0].inspect
- end
- end
- end
- eval("_=nil", bind)
- bind
- end
-
- def IRB.delete_caller
- end
-end