RichardOnRails
2010-May-31 13:15 UTC
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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-May-31 17:39 UTC
Re: Ruby breakpoint has weird idea of what local_variables a
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 > RichardBest, -- Marnen Laibow-Koser marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via ruby-forum.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
RichardOnRails
2010-May-31 19:20 UTC
Re: Ruby breakpoint has weird idea of what local_variables a
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 On May 31, 1:39 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://www.ruby-forum.com.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-May-31 19:44 UTC
Re: Ruby breakpoint has weird idea of what local_variables a
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, > RichardBest, -- Marnen Laibow-Koser marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via ruby-forum.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
RichardOnRails
2010-Jun-04 23:30 UTC
Re: Ruby breakpoint has weird idea of what local_variables a
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 Klemme was helpful there. Talk to you soon, no doubt, Richard On May 31, 3:44 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://www.ruby-forum.com.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Jun-04 23:34 UTC
Re: Ruby breakpoint has weird idea of what local_variables a
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 Klemme was helpful there. >Great!> Talk to you soon, no doubt, > RichardBest, -- Marnen Laibow-Koser marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via ruby-forum.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
RichardOnRails
2010-Jun-05 00:33 UTC
Re: Ruby breakpoint has weird idea of what local_variables a
> 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 On Jun 4, 7:34 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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 Klemme was helpful there. > > Great! > > > Talk to you soon, no doubt, > > Richard > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > -- > Posted viahttp://www.ruby-forum.com.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.