* lib/debug.rb: require 'continuation' to implement "restart"

command.  [ruby-dev:33992]

* lib/debug.rb (Context::debug_command): remove local variable
  shadowing to shut up warnings.  [ruby-dev:33992]

* lib/debug.rb (Context::display_list): ditto.

* lib/debug.rb (Context::resume): ditto.

* lib/debug.rb (Context::get_thread): no longer use #index for Hash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-03-05 02:52:43 +00:00
parent 772c19298d
commit 413db1b036
3 changed files with 22 additions and 7 deletions

View File

@ -1,3 +1,17 @@
Wed Mar 5 11:50:32 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/debug.rb: require 'continuation' to implement "restart"
command. [ruby-dev:33992]
* lib/debug.rb (Context::debug_command): remove local variable
shadowing to shut up warnings. [ruby-dev:33992]
* lib/debug.rb (Context::display_list): ditto.
* lib/debug.rb (Context::resume): ditto.
* lib/debug.rb (Context::get_thread): no longer use #index for Hash.
Tue Mar 4 21:35:59 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/irb.rb (IRB::Irb::eval_input): SyntaxError should not be

View File

@ -2,6 +2,8 @@
# 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
@ -295,7 +297,7 @@ class Context
if break_points.find{|b| b[1] == 0}
n = 1
stdout.print "Breakpoints:\n"
for b in break_points
break_points.each do |b|
if b[0] and b[1] == 0
stdout.printf " %d %s:%s\n", n, b[2], b[3]
end
@ -591,7 +593,6 @@ EOHELP
def display_list(b, e, file, line)
stdout.printf "[%d, %d] in %s\n", b, e, file
if lines = SCRIPT_LINES__[file] and lines != true
n = 0
b.upto(e) do |n|
if n > 0 && lines[n-1]
if n == line
@ -780,7 +781,7 @@ class << DEBUGGER__
def resume
MUTEX.synchronize do
make_thread_list
for th, in @thread_list
@thread_list.each do |th,|
next if th == Thread.current
context(th).clear_suspend
end
@ -806,7 +807,7 @@ class << DEBUGGER__
end
def get_thread(num)
th = @thread_list.index(num)
th = @thread_list.key(num)
unless th
@stdout.print "No thread ##{num}\n"
throw :debug_error

View File

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2008-03-04"
#define RUBY_RELEASE_DATE "2008-03-05"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20080304
#define RUBY_RELEASE_CODE 20080305
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 3
#define RUBY_RELEASE_DAY 4
#define RUBY_RELEASE_DAY 5
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];