# Ruby breakpoint has weird idea of what local\_variables are?

**URL:** <https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410>\
**Category:** Rails\
**Created:** [May 31, 2010, 3:17pm UTC](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410 "2010-05-31T15:17:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [May 31, 2010, 3:17pm UTC](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410/1 "2010-05-31T15:17:25Z")

</div>

Hi,

I’ve got a 7-liner:  
require ‘rubygems’  
require ‘breakpoint’

a = ‘aaa’  
b = ‘bbb’  
breakpoint  
c = ‘ccc’

In a Command window, I’ve got:  
K:\_Projects\Ruby\_Ruby\_Tests\TestBreakpoint\>ruby TestBreakpoint.rb  
Executing break point at TestBreakpoint.rb:9  
irb(main):001:0\> local\_variables  
=\> [“id”, “block”, “\_”]  
irb(main):002:0\> quit

Why doesn’t the array allegedly presenting local variables:

1. Include a, b & c?
2. Present the things it does; what do they signify?

I’m running Ruby 1.8.6 over WinXP-Pro/SP3

Thanks in Advance  
Richard

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [May 31, 2010, 7:39pm UTC](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410/2 "2010-05-31T19:39:53Z")

</div>

RichardOnRails wrote:

> Hi,
> 
> I’ve got a 7-liner:  
> require ‘rubygems’  
> require ‘breakpoint’
> 
> a = ‘aaa’  
> b = ‘bbb’  
> breakpoint  
> c = ‘ccc’
> 
> In a Command window, I’ve got:  
> K:\_Projects\Ruby\_Ruby\_Tests\TestBreakpoint\>ruby TestBreakpoint.rb  
> Executing break point at TestBreakpoint.rb:9  
> irb(main):001:0\> local\_variables  
> =\> [“id”, “block”, “\_”]  
> irb(main):002:0\> quit
> 
> Why doesn’t the array allegedly presenting local variables:
> 
> 1. Include a, b & c?
> 2. Present the things it does; what do they signify?

I don’t know, but you’re asking this question on the wrong list. This  
is not a Rails question, and so should be directed to the main Ruby  
list.

> I’m running Ruby 1.8.6 over WinXP-Pro/SP3
> 
> Thanks in Advance  
> Richard

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [May 31, 2010, 9:31pm UTC](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410/3 "2010-05-31T21:31:31Z")

</div>

Geez, Marnen,

I don’t see why people on a list focused on the most famous Ruby app  
would view it beneath themselves to address a fundamental Ruby  
question.

Incidentally, my question is, in fact, related to a Rails - a Rails  
application. My client for the Rails app wants to change a bunch of  
the app’s field names. This is a job for a machine, say  
ActiveScaffold, for example. However, despite the documentation from  
[ActiveScaffold.com](http://ActiveScaffold.com) and folks in the ActiveScaffold newsgroup, I still  
don’t have that running.

Hence, I wrote my own tool (in Ruby, of course), which I hope to  
finish by tomorrow. But it’s gotten complicated, which led to try  
introducing Ruby Debug rather than puts debugging statements. For  
this purpose, I was guided by Ruby Cookbook, O’Reilly, 2006.

I thought the RoR community might be sympathetic to a poor soul trying  
to build a Rails-app administration tool.

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [June 5, 2010, 1:32am UTC](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410/4 "2010-06-05T01:32:14Z")

</div>

Hi Marnen,

> ActiveScaffold is dead simple to use. Perhaps if you were to ask  
> questions about the problems you’re actually having, we could help.

It probably is, but I’ve run into problems a couple of times, so I  
shelved the idea for the time being. Anyway, writing some Ruby to  
manipulate a Rails app is fun. And I did post my question on the Ruby  
NG and Robert K. was helpful there.

Talk to you soon, no doubt,  
Richard

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [May 31, 2010, 9:44pm UTC](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410/5 "2010-05-31T21:44:35Z")

</div>

RichardOnRails wrote:

> Geez, Marnen,
> 
> I don’t see why people on a list focused on the most famous Ruby app  
> would view it beneath themselves to address a fundamental Ruby  
> question.

It’s not that they see it as “beneath themselves”. It’s simply that  
this is a forum for Rails issues, and only for Rails issues. A simple  
issue with the Ruby debugger is off topic here. Please ask your  
question where it is on topic – it will get seen by Ruby experts who  
are familiar with the debugger but don’t necessarily use Rails.

> Incidentally, my question is, in fact, related to a Rails - a Rails  
> application.

No. It came up _in the course of_ Rails development, but it is not a  
Rails-related question as you’ve presented it.

> My client for the Rails app wants to change a bunch of  
> the app’s field names. This is a job for a machine, say  
> ActiveScaffold, for example. However, despite the documentation from  
> [ActiveScaffold.com](http://ActiveScaffold.com) and folks in the ActiveScaffold newsgroup, I still  
> don’t have that running.

ActiveScaffold is dead simple to use. Perhaps if you were to ask  
questions about the problems you’re actually having, we could help.

In other words, please explicitly ask the questions you actually want  
answered.

> Hence, I wrote my own tool (in Ruby, of course), which I hope to  
> finish by tomorrow. But it’s gotten complicated, which led to try  
> introducing Ruby Debug rather than puts debugging statements. For  
> this purpose, I was guided by Ruby Cookbook, O’Reilly, 2006.
> 
> I thought the RoR community might be sympathetic to a poor soul trying  
> to build a Rails-app administration tool.

It might. But your proximate problem is not with Rails.

> Best wishes,  
> Richard

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [June 5, 2010, 2:34am UTC](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410/6 "2010-06-05T02:34:52Z")

</div>

> And the problems were…?

I’ll take another run at ActiveScaffold in a week or two. Right now,  
I’m applying ruiby-debug and logging in place of my long-years of  
inserting ad hoc debugging, e.g puts in Ruby or printf in C++. But  
I’m letting A.S. distract me from my current path.

Nevertheless, thanks for asking. I WILL get back to A.S. soon.

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [June 5, 2010, 1:34am UTC](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410/7 "2010-06-05T01:34:40Z")

</div>

RichardOnRails wrote:

> Hi Marnen,
> 
> > ActiveScaffold is dead simple to use. Perhaps if you were to ask  
> > questions about the problems you’re actually having, we could help.
> 
> It probably is, but I’ve run into problems a couple of times,

And the problems were…?

> so I  
> shelved the idea for the time being. Anyway, writing some Ruby to  
> manipulate a Rails app is fun.

Yes, and it’s a great way to learn. Just be aware that you’re  
reinventing the wheel.

> And I did post my question on the Ruby  
> NG and Robert K. was helpful there.

Great!

> Talk to you soon, no doubt,  
> Richard

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
