lib/irb/ext/tracer.rb in irb-1.1.1 vs lib/irb/ext/tracer.rb in irb-1.2.0
- old
+ new
@@ -7,10 +7,23 @@
#
# --
#
#
#
-require "tracer"
+begin
+ 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
# initialize tracing function
def IRB.initialize_tracer