aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/ext
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-09 02:02:58 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-09 02:02:58 +0000
commit76515504d552d3677f81539c29ed5f558f0dc4f0 (patch)
treeef35eaabde005fe0350b8ac955a63a4cebaa1cdc /lib/irb/ext
parent5afa23b4a46b55667d8f1c6e4490dfb315c8616f (diff)
downloadruby-76515504d552d3677f81539c29ed5f558f0dc4f0.tar.gz
* lib/irb.rb: removed commented-out code.
* lib/irb/**/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/ext')
-rw-r--r--lib/irb/ext/change-ws.rb24
-rw-r--r--lib/irb/ext/history.rb3
-rw-r--r--lib/irb/ext/loader.rb1
-rw-r--r--lib/irb/ext/multi-irb.rb1
-rw-r--r--lib/irb/ext/save-history.rb16
5 files changed, 1 insertions, 44 deletions
diff --git a/lib/irb/ext/change-ws.rb b/lib/irb/ext/change-ws.rb
index a5c243aaf3..0ae9097285 100644
--- a/lib/irb/ext/change-ws.rb
+++ b/lib/irb/ext/change-ws.rb
@@ -40,30 +40,6 @@ module IRB # :nodoc:
main.extend ExtendCommandBundle
end
end
-
-# def change_binding(*_main)
-# back = @workspace
-# @workspace = WorkSpace.new(*_main)
-# unless _main.empty?
-# begin
-# main.extend ExtendCommandBundle
-# rescue
-# print "can't change binding to: ", main.inspect, "\n"
-# @workspace = back
-# return nil
-# end
-# end
-# @irb_level += 1
-# begin
-# catch(:SU_EXIT) do
-# @irb.eval_input
-# end
-# ensure
-# @irb_level -= 1
-# @workspace = back
-# end
-# end
-# alias change_workspace change_binding
end
end
diff --git a/lib/irb/ext/history.rb b/lib/irb/ext/history.rb
index d991f4d33b..0096357c9c 100644
--- a/lib/irb/ext/history.rb
+++ b/lib/irb/ext/history.rb
@@ -21,8 +21,7 @@ module IRB # :nodoc:
def set_last_value(value)
_set_last_value(value)
- # @workspace.evaluate self, "_ = IRB.CurrentContext.last_value"
- if @eval_history #and !@eval_history_values.equal?(llv)
+ if @eval_history
@eval_history_values.push @line_no, @last_value
@workspace.evaluate self, "__ = IRB.CurrentContext.instance_eval{@eval_history_values}"
end
diff --git a/lib/irb/ext/loader.rb b/lib/irb/ext/loader.rb
index 9edf02b1d0..054ce6b0d1 100644
--- a/lib/irb/ext/loader.rb
+++ b/lib/irb/ext/loader.rb
@@ -82,7 +82,6 @@ module IRB # :nodoc:
irb.suspend_input_method(FileInputMethod.new(path)) do
|back_io|
irb.signal_status(:IN_LOAD) do
- # p irb.conf
if back_io.kind_of?(FileInputMethod)
irb.eval_input
else
diff --git a/lib/irb/ext/multi-irb.rb b/lib/irb/ext/multi-irb.rb
index b46aa5a1d8..01d06fb222 100644
--- a/lib/irb/ext/multi-irb.rb
+++ b/lib/irb/ext/multi-irb.rb
@@ -17,7 +17,6 @@ module IRB
# Creates a new JobManager object
def initialize
- # @jobs = [[thread, irb],...]
@jobs = []
@current_job = nil
end
diff --git a/lib/irb/ext/save-history.rb b/lib/irb/ext/save-history.rb
index d2ea37f950..b4c72a0339 100644
--- a/lib/irb/ext/save-history.rb
+++ b/lib/irb/ext/save-history.rb
@@ -59,23 +59,7 @@ module IRB
module HistorySavingAbility # :nodoc:
include Readline
-# def HistorySavingAbility.create_finalizer
-# proc do
-# if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) > 0
-# if hf = IRB.conf[:HISTORY_FILE]
-# file = File.expand_path(hf)
-# end
-# file = IRB.rc_file("_history") unless file
-# open(file, 'w' ) do |f|
-# hist = HISTORY.to_a
-# f.puts(hist[-num..-1] || hist)
-# end
-# end
-# end
-# end
-
def HistorySavingAbility.extended(obj)
-# ObjectSpace.define_finalizer(obj, HistorySavingAbility.create_finalizer)
IRB.conf[:AT_EXIT].push proc{obj.save_history}
obj.load_history
obj