mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/debug.rb (DEBUGGER__::Context::debug_command): do not call
debug_silent_eval() when $1 is not set. (ruby-bugs PR#1194) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
653ad6fd4b
commit
3ec0bc3828
2 changed files with 11 additions and 4 deletions
|
@ -9,6 +9,11 @@ Thu Oct 16 23:51:04 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
|||
in a callback operation, Ruby/Tk shows a (verbose) backtrace
|
||||
information on the callback process.
|
||||
|
||||
Thu Oct 16 17:09:19 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/debug.rb (DEBUGGER__::Context::debug_command): do not call
|
||||
debug_silent_eval() when $1 is not set. (ruby-bugs PR#1194)
|
||||
|
||||
Thu Oct 16 16:54:57 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_upto): ("a"..."a").to_a should return [].
|
||||
|
|
10
lib/debug.rb
10
lib/debug.rb
|
@ -174,8 +174,7 @@ class Context
|
|||
|
||||
def debug_silent_eval(str, binding)
|
||||
begin
|
||||
val = eval(str, binding)
|
||||
val
|
||||
eval(str, binding)
|
||||
rescue StandardError, ScriptError
|
||||
nil
|
||||
end
|
||||
|
@ -301,9 +300,12 @@ class Context
|
|||
end
|
||||
|
||||
when /^\s*b(?:reak)?\s+(?:(.+):)?([^.:]+)$/
|
||||
p $~.to_a
|
||||
pos = $2
|
||||
file = $1 || file
|
||||
klass = debug_silent_eval($1, binding)
|
||||
if $1
|
||||
klass = debug_silent_eval($1, binding)
|
||||
file = $1
|
||||
end
|
||||
if pos =~ /^\d+$/
|
||||
pname = pos
|
||||
pos = pos.to_i
|
||||
|
|
Loading…
Reference in a new issue