summaryrefslogtreecommitdiff
path: root/lib/irb.rb
diff options
context:
space:
mode:
authorst0012 <stan001212@gmail.com>2022-10-02 10:20:26 +0100
committergit <svn-admin@ruby-lang.org>2022-10-03 07:00:53 +0900
commitb97e909ef476a6facbaec665a205fee486371044 (patch)
treec1c05c1c72aeb2836456aaa1bb41e16021a4ac66 /lib/irb.rb
parent7b88ffb34fc995d7499fd9ed384cf7f5ba12994e (diff)
[ruby/irb] Remove unnecessary Thread presence check
They were introduced around 20 years ago, when Thread is not yet stabilized. So we don't need them anymore. https://github.com/ruby/irb/commit/4c75e03b2b
Diffstat (limited to 'lib/irb.rb')
-rw-r--r--lib/irb.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index 9a3a491641..0c145069c0 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -389,11 +389,7 @@ module IRB
#
# Will raise an Abort exception, or the given +exception+.
def IRB.irb_abort(irb, exception = Abort)
- if defined? Thread
- irb.context.thread.raise exception, "abort then interrupt!"
- else
- raise exception, "abort then interrupt!"
- end
+ irb.context.thread.raise exception, "abort then interrupt!"
end
class Irb