1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Disable tracer ext of IRB when tracer doesn't found

This commit is contained in:
aycabta 2019-11-24 22:42:08 +09:00
parent b563439274
commit 745ab16818

View file

@ -9,7 +9,21 @@
#
#
#
require "tracer"
begin
raise LoadError
require "tracer"
rescue LoadError
$stderr.puts "Tracer extension of IRB is enabled but tracer gem doesn't found."
module IRB
TracerLoadError = true
class Context
def use_tracer=(opt)
# do nothing
end
end
end
return # This is about to disable loading below
end
module IRB