Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Rocky Bernstein
RE: 'list/next' confused with multiline array [ reply ]  
2007-11-29 03:28
I don't see a problem with what's currently in SVN. See below for what I tried. You may
be confused about how list is supposed to work.

A draft of the ruby-debug manual for CURRENT SVN sources (which is enough different from 0.9.3) can be found at http://bashdb.sf.net/ruby-debug.html

Please read http://bashdb.sourceforge.net/ruby-debug.html#SEC27 aand if you still think there is a problem post a bug report.

Thanks

rdebug /tmp/bug.rb
/tmp/bug.rb:1
x = 1
(rdb:1) l 1-9
[1, 9] in /tmp/bug.rb
=> 1 x = 1
2 columnHeaders = Array[{:html_options => 'style="width: 20%;"', :data => 'Name'},
3 {:html_options => 'style="width: 27%;"', :data => 'Description'},
4 {:html_options => 'style="width: 20%;"', :data => 'Account'},
5 {:html_options => 'style="width: 11%;"', :data => 'Rate'},
6 {:html_options => 'style="width: 12%;"', :data => 'Type'},
7 {:html_options => 'style="text-align: center; width: 10%;"', :data => 'Options'}]
8 x = 2
9
(rdb:1) l
[-4, 5] in /tmp/bug.rb
=> 1 x = 1
2 columnHeaders = Array[{:html_options => 'style="width: 20%;"', :data => 'Name'},
3 {:html_options => 'style="width: 27%;"', :data => 'Description'},
4 {:html_options => 'style="width: 20%;"', :data => 'Account'},
5 {:html_options => 'style="width: 11%;"', :data => 'Rate'},
(rdb:1) l
[6, 15] in /tmp/bug.rb
6 {:html_options => 'style="width: 12%;"', :data => 'Type'},
7 {:html_options => 'style="text-align: center; width: 10%;"', :data => 'Options'}]
8 x = 2
9
(rdb:1) set listsize 2
Number of source lines to list by default is 2.
(rdb:1) list 1
[0, 1] in /tmp/bug.rb
=> 1 x = 1
(rdb:1) list 2
[1, 2] in /tmp/bug.rb
=> 1 x = 1
2 columnHeaders = Array[{:html_options => 'style="width: 20%;"', :data => 'Name'},
(rdb:1) list 3
[2, 3] in /tmp/bug.rb
2 columnHeaders = Array[{:html_options => 'style="width: 20%;"', :data => 'Name'},
3 {:html_options => 'style="width: 27%;"', :data => 'Description'},
(rdb:1) n
/tmp/bug.rb:2
columnHeaders = Array[{:html_options => 'style="width: 20%;"', :data => 'Name'},
(rdb:1) l
[1, 2] in /tmp/bug.rb
1 x = 1
=> 2 columnHeaders = Array[{:html_options => 'style="width: 20%;"', :data => 'Name'},
(rdb:1) n
/tmp/bug.rb:8
x = 2


By: John Dell
'list/next' confused with multiline array [ reply ]  
2007-10-01 18:10
Hi,

I'm using latest gem (0.9.3) and found that the 'list' command showing current line gets completely confused when stepping through an array declaration that spans more than one line.

'list' on this source is hosed (not sure if forum will display it correctly), but if change this into a single line declaration, it works fine.

Is this a known bug?

columnHeaders = Array[{:html_options => 'style="width: 20%;"', :data => 'Name'},
{:html_options => 'style="width: 27%;"', :data => 'Description'},
{:html_options => 'style="width: 20%;"', :data => 'Account'},
{:html_options => 'style="width: 11%;"', :data => 'Rate'},
{:html_options => 'style="width: 12%;"', :data => 'Type'},
{:html_options => 'style="text-align: center; width: 10%;"', :data => 'Options'}]