Greg Hauptmann
2006-Sep-15 10:36 UTC
is there a multiline ruby "comment" approach? like java''s /* code */ ???
Hi, Just wondering if there is a way to easy comment out a block of ruby code without putting the "#" characters on each line? Is there an equivalent to java''s /* */, for example: /* askdf asd fasdf as dfasd fa */ Thanks --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Rimantas Liubertas
2006-Sep-15 11:05 UTC
Re: is there a multiline ruby "comment" approach? like java''s /* code */ ???
> Hi, > > Just wondering if there is a way to easy comment out a block of ruby code > without putting the "#" characters on each line? > > Is there an equivalent to java''s /* */, for example:<...> =begin your comment... ... going on... ... and on... =end Regards, Rimantas -- http://rimantas.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2006-Sep-15 11:08 UTC
Re: is there a multiline ruby "comment" approach? like java''s /* code */ ???
excellent - thanks Rimantas --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jon Collier
2006-Sep-15 14:54 UTC
Re: is there a multiline ruby "comment" approach? like java''
Am I correct in that the =begin and =end have to be on the beginning of a newline? -- Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jason Roelofs
2006-Sep-15 16:14 UTC
Re: is there a multiline ruby "comment" approach? like java''
Yes, and as far as I know, that''s the only multi-line comment syntax in Ruby. Jason On 9/15/06, Jon Collier <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Am I correct in that the =begin and =end have to be on the beginning of > a newline? > > -- > Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Tony Bianco
2008-Mar-04 22:00 UTC
Re: is there a multiline ruby "comment" approach? like java''
I''m using Rails 2.0 and I tried this and this is the error I got syntax error, unexpected ''='' =begin ======== CODE ===========def who_bought =begin respond_to do |format| format.xml { @product = Product.find(params[:id]) @orders = @product.orders } end =end end ======== END CODE ======= -- Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jason Roelofs
2008-Mar-05 12:24 UTC
Re: is there a multiline ruby "comment" approach? like java''
=begin =end They must be the first thing on that line. No whitespace can precede it. Jason On Tue, Mar 4, 2008 at 5:00 PM, Tony Bianco <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m using Rails 2.0 and I tried this and this is the error I got > > syntax error, unexpected ''='' > =begin > > > ======== CODE ===========> def who_bought > =begin > respond_to do |format| > format.xml { > @product = Product.find(params[:id]) > @orders = @product.orders > } > end > =end > end > ======== END CODE =======> > -- > > Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tony Bianco
2008-Mar-06 05:35 UTC
Re: is there a multiline ruby "comment" approach? like java''
thanks! That helps. I couldn''t figure out why I couldn''t get it to work. -- Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---