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:
parent
b563439274
commit
745ab16818
1 changed files with 15 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue