summaryrefslogtreecommitdiffstats
path: root/lib/debug.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-16 17:46:14 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-16 17:46:14 +0000
commitd9a34753f78b8db5115b10bb1df137a16c4c90cf (patch)
treea4f261c3a26c5d96eb562c8185e3521af2d07241 /lib/debug.rb
parentb73aa2f6d6046e5030fac65d3e1518dcfce4f35f (diff)
downloadruby-d9a34753f78b8db5115b10bb1df137a16c4c90cf.tar.gz
ruby-d9a34753f78b8db5115b10bb1df137a16c4c90cf.tar.xz
ruby-d9a34753f78b8db5115b10bb1df137a16c4c90cf.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@4789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/debug.rb')
-rw-r--r--lib/debug.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/debug.rb b/lib/debug.rb
index 59dcae5e1..a3f6c2800 100644
--- a/lib/debug.rb
+++ b/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