Bump debug version to 0.2.1

This commit is contained in:
Hiroshi SHIBATA authored and nagachika committed 2021-11-22 10:51:35 +09:00
1 parent c6d9bd75ee
commit 8ddad13dcd
2 files changed
+22 -8

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = "debug"
spec.version = "0.2.0"
spec.version = "0.2.1"
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
+21 -7
View File
@@ -3,7 +3,10 @@
# Copyright (C) 2000 Information-technology Promotion Agency, Japan
# Copyright (C) 2000-2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
require 'continuation'
if $SAFE > 0
STDERR.print "-r debug.rb is not available in safe mode\n"
exit 1
end
require 'tracer'
require 'pp'
@@ -178,6 +181,9 @@ SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__ # :nodoc:
class DEBUGGER__
MUTEX = Thread::Mutex.new # :nodoc:
CONTINUATIONS_SUPPORTED = RUBY_ENGINE == 'ruby'
require 'continuation' if CONTINUATIONS_SUPPORTED
class Context # :nodoc:
DEBUG_LAST_CMD = []
@@ -375,8 +381,10 @@ class DEBUGGER__
def debug_command(file, line, id, binding)
MUTEX.lock
unless defined?($debugger_restart) and $debugger_restart
callcc{|c| $debugger_restart = c}
if CONTINUATIONS_SUPPORTED
unless defined?($debugger_restart) and $debugger_restart
callcc{|c| $debugger_restart = c}
end
end
set_last_thread(Thread.current)
frame_pos = 0
@@ -648,7 +656,11 @@ class DEBUGGER__
stdout.printf "%s\n", debug_eval($', binding).inspect
when /^\s*r(?:estart)?$/
$debugger_restart.call
if CONTINUATIONS_SUPPORTED
$debugger_restart.call
else
stdout.print "Restart requires continuations.\n"
end
when /^\s*h(?:elp)?$/
debug_print_help()
@@ -1097,9 +1109,11 @@ EOHELP
stdout.printf "Debug.rb\n"
stdout.printf "Emacs support available.\n\n"
RubyVM::InstructionSequence.compile_option = {
trace_instruction: true
}
if defined?(RubyVM::InstructionSequence)
RubyVM::InstructionSequence.compile_option = {
trace_instruction: true
}
end
set_trace_func proc { |event, file, line, id, binding, klass, *rest|
DEBUGGER__.context.trace_func event, file, line, id, binding, klass
}