<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Life is grand - Latest Comments in Commenting in Ruby</title><link>http://lifeisgrand.disqus.com/</link><description></description><atom:link href="https://lifeisgrand.disqus.com/commenting_in_ruby/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 21 Dec 2007 11:15:46 -0000</lastBuildDate><item><title>Re: Commenting in Ruby</title><link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-1280365</link><description>&lt;p&gt;No, That does not work.&lt;br&gt;In Rhtml or ERB I would use :&lt;/p&gt;&lt;p&gt;Do you have alternatives?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Los Angeles Electricians</dc:creator><pubDate>Fri, 21 Dec 2007 11:15:46 -0000</pubDate></item><item><title>Re: Commenting in Ruby</title><link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-1280363</link><description>&lt;p&gt;Does that work in RHTML/ERB files though Los Angeles Electricians?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">paulmwatson</dc:creator><pubDate>Thu, 20 Dec 2007 03:28:13 -0000</pubDate></item><item><title>Re: Commenting in Ruby</title><link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-1280364</link><description>&lt;p&gt;Brian,&lt;br&gt;For block comment, you do:&lt;/p&gt;&lt;p&gt;=begin&lt;br&gt;Your code&lt;br&gt;=end&lt;/p&gt;&lt;p&gt;I hope you find that useful&lt;br&gt;Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Los Angeles Electricians</dc:creator><pubDate>Thu, 20 Dec 2007 01:56:36 -0000</pubDate></item><item><title>Re: Commenting in Ruby</title><link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-1280362</link><description>&lt;p&gt;Do you know if there is any way to do block comment on view block? I mean on the rhtml file?&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brian</dc:creator><pubDate>Mon, 17 Dec 2007 19:34:17 -0000</pubDate></item><item><title>Re: Commenting in Ruby</title><link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-1280361</link><description>&lt;p&gt;Depending on your editor, you can also use the # comment easily to block comment by using rectangular select, eg in jedit alt+/ will toggle triangular select, then shift+down arrow at the beginning of the lines you want to comment, then a single # will put a hash at the beginning of all the lines. Similarly to uncomment, simply delete the # using the same select method. Once you get the hang of it, it's really easy.&lt;/p&gt;&lt;p&gt;PS the rectangular select is brilliant, once you start using it, you'll wonder how you ever managed without it!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jay</dc:creator><pubDate>Mon, 21 May 2007 04:12:06 -0000</pubDate></item><item><title>Re: Commenting in Ruby</title><link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-1280360</link><description>&lt;p&gt;If you use textmate on the mac, you can highlight a block of code and hit command + / to comment it and then again to remove the comments.  Or on vim shift + v and cursor down to select the line then s/^/#/g, phew!&lt;/p&gt;&lt;p&gt;I agree though, it can be painful after spending years using /* */ comments.  IMHO, its one of the very few annoyances I have with ruby.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Law</dc:creator><pubDate>Thu, 10 May 2007 18:25:40 -0000</pubDate></item><item><title>Re: Commenting in Ruby</title><link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-1280359</link><description>&lt;p&gt;In normal code I agree, line comments work better. But in this case, and often enough, I had 15 lines of code I wanted to exclude to check something.&lt;/p&gt;&lt;p&gt;Block comments are useful during development.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Watson</dc:creator><pubDate>Wed, 10 May 2006 03:24:58 -0000</pubDate></item><item><title>Re: Commenting in Ruby</title><link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-1280358</link><description>&lt;p&gt;Pretty much most people don't even use the =begin/=end blocks any more. I just write stuff like&lt;/p&gt;&lt;p&gt;# This function adds two numbers together.&lt;br&gt;# No overflow checking is provided.&lt;br&gt;def sum(a,b)&lt;br&gt;  a + b&lt;br&gt;end&lt;/p&gt;&lt;p&gt;It's easier to read and makes the comments more discernible.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Farrel Lifson</dc:creator><pubDate>Tue, 09 May 2006 15:30:27 -0000</pubDate></item></channel></rss>