cldwalker / debugger

port of ruby-debug that works on 1.9.2 and 1.9.3
BSD 2-Clause "Simplified" License
845 stars 80 forks source link

fix show command #99

Closed arthurnn closed 11 years ago

arthurnn commented 11 years ago

show command is broken on master after https://github.com/cldwalker/debugger/commit/d7f5ea7cddf9d4611cdd8e795522f3433ad02e0c

stacktrace

rdb:1) show
INTERNAL ERROR!!! undefined local variable or method `subcmd' for #<Debugger::ShowCommand:0x007ffeb0f4bf80>
        /opt/boxen/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/debugger-1.6.0/lib/ruby-debug/commands/show.rb:185:in `execute'
        /opt/boxen/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/debugger-1.6.0/lib/ruby-debug/processor.rb:279:in `one_cmd'
        /opt/boxen/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/debugger-1.6.0/lib/ruby-debug/processor.rb:265:in `block (2 levels) in process_commands'
        /opt/boxen/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/debugger-1.6.0/lib/ruby-debug/processor.rb:264:in `each'
        /opt/boxen/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/debugger-1.6.0/lib/ruby-debug/processor.rb:264:in `block in process_commands'
        /opt/boxen/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/debugger-1.6.0/lib/ruby-debug/processor.rb:257:in `catch'
        /opt/boxen/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/debugger-1.6.0/lib/ruby-debug/processor.rb:257:in `process_commands'
        /opt/boxen/rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/debugger-1.6.0/lib/ruby-debug/processor.rb:190:in `at_line'
        (eval):5:in `block in at_line'
        <internal:prelude>:10:in `synchronize'

This patch fixes the problem and add a regression test.

cldwalker commented 11 years ago

Nice catch. Thanks!