зеркало из https://github.com/github/ruby.git
Disable tracer ext of IRB when tracer doesn't found
This commit is contained in:
Родитель
b563439274
Коммит
745ab16818
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче