summaryrefslogtreecommitdiff
path: root/lib/irb/ext
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-11-25 05:38:09 +0900
committeraycabta <aycabta@gmail.com>2019-11-25 05:38:09 +0900
commit51ea1abb5f2ed70387dda28a5d0d9ee817367d61 (patch)
treef7eb2f57a21436682212399ecc34dcacbb5b91c2 /lib/irb/ext
parentefbca15116d4aea1588c6ba4ef0eb72c3c55c1db (diff)
Remove e2mmap dependency
Diffstat (limited to 'lib/irb/ext')
-rw-r--r--lib/irb/ext/multi-irb.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/irb/ext/multi-irb.rb b/lib/irb/ext/multi-irb.rb
index 28d6fba832..74de1ecde5 100644
--- a/lib/irb/ext/multi-irb.rb
+++ b/lib/irb/ext/multi-irb.rb
@@ -9,7 +9,7 @@
#
#
#
-IRB.fail CantShiftToMultiIrbMode unless defined?(Thread)
+fail CantShiftToMultiIrbMode unless defined?(Thread)
module IRB
class JobManager
@@ -67,8 +67,8 @@ module IRB
# exception is raised.
def switch(key)
th, irb = search(key)
- IRB.fail IrbAlreadyDead unless th.alive?
- IRB.fail IrbSwitchedToCurrentThread if th == Thread.current
+ fail IrbAlreadyDead unless th.alive?
+ fail IrbSwitchedToCurrentThread if th == Thread.current
@current_job = irb
th.run
Thread.stop
@@ -84,7 +84,7 @@ module IRB
def kill(*keys)
for key in keys
th, _ = search(key)
- IRB.fail IrbAlreadyDead unless th.alive?
+ fail IrbAlreadyDead unless th.alive?
th.exit
end
end
@@ -114,7 +114,7 @@ module IRB
else
@jobs.find{|k, v| v.context.main.equal?(key)}
end
- IRB.fail NoSuchJob, key if job.nil?
+ fail NoSuchJob, key if job.nil?
job
end
@@ -122,7 +122,7 @@ module IRB
def delete(key)
case key
when Integer
- IRB.fail NoSuchJob, key unless @jobs[key]
+ fail NoSuchJob, key unless @jobs[key]
@jobs[key] = nil
else
catch(:EXISTS) do
@@ -135,7 +135,7 @@ module IRB
throw :EXISTS
end
end
- IRB.fail NoSuchJob, key
+ fail NoSuchJob, key
end
end
until assoc = @jobs.pop; end unless @jobs.empty?