Ruby breakpoint has weird idea of what local_variables are?

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

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
[email protected]

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 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

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

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 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
[email protected]

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

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
[email protected]