<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Commenting in Ruby</title>
	<link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/</link>
	<description>The journal of Paul M. Watson</description>
	<pubDate>Fri, 04 Jul 2008 14:09:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Los Angeles Electricians</title>
		<link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-42266</link>
		<pubDate>Fri, 21 Dec 2007 16:15:46 +0000</pubDate>
		<guid>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-42266</guid>
					<description>No, That does not work.
In Rhtml or ERB I would use :
&lt;!-- --&gt;

Do you have alternatives?</description>
		<content:encoded><![CDATA[<p>No, That does not work.<br />
In Rhtml or ERB I would use :<br />
<!-- --></p>
<p>Do you have alternatives?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: paulmwatson</title>
		<link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-42113</link>
		<pubDate>Thu, 20 Dec 2007 08:28:13 +0000</pubDate>
		<guid>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-42113</guid>
					<description>Does that work in RHTML/ERB files though Los Angeles Electricians?</description>
		<content:encoded><![CDATA[<p>Does that work in RHTML/ERB files though Los Angeles Electricians?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Los Angeles Electricians</title>
		<link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-42095</link>
		<pubDate>Thu, 20 Dec 2007 06:56:36 +0000</pubDate>
		<guid>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-42095</guid>
					<description>Brian,
For block comment, you do:

=begin
Your code
=end

I hope you find that useful
Thanks</description>
		<content:encoded><![CDATA[<p>Brian,<br />
For block comment, you do:</p>
<p>=begin<br />
Your code<br />
=end</p>
<p>I hope you find that useful<br />
Thanks
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Brian</title>
		<link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-41799</link>
		<pubDate>Tue, 18 Dec 2007 00:34:17 +0000</pubDate>
		<guid>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-41799</guid>
					<description>Do you know if there is any way to do block comment on view block? I mean on the rhtml file?

Thanks</description>
		<content:encoded><![CDATA[<p>Do you know if there is any way to do block comment on view block? I mean on the rhtml file?</p>
<p>Thanks
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Jay</title>
		<link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-13736</link>
		<pubDate>Mon, 21 May 2007 08:12:06 +0000</pubDate>
		<guid>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-13736</guid>
					<description>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.

PS the rectangular select is brilliant, once you start using it, you'll wonder how you ever managed without it!</description>
		<content:encoded><![CDATA[<p>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&#8217;s really easy.</p>
<p>PS the rectangular select is brilliant, once you start using it, you&#8217;ll wonder how you ever managed without it!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Matt Law</title>
		<link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-13005</link>
		<pubDate>Thu, 10 May 2007 22:25:40 +0000</pubDate>
		<guid>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-13005</guid>
					<description>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!

I agree though, it can be painful after spending years using /* */ comments.  IMHO, its one of the very few annoyances I have with ruby.</description>
		<content:encoded><![CDATA[<p>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!</p>
<p>I agree though, it can be painful after spending years using /* */ comments.  IMHO, its one of the very few annoyances I have with ruby.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Paul Watson</title>
		<link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-261</link>
		<pubDate>Wed, 10 May 2006 07:24:58 +0000</pubDate>
		<guid>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-261</guid>
					<description>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.

Block comments are useful during development.</description>
		<content:encoded><![CDATA[<p>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.</p>
<p>Block comments are useful during development.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Farrel Lifson</title>
		<link>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-260</link>
		<pubDate>Tue, 09 May 2006 19:30:27 +0000</pubDate>
		<guid>http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/#comment-260</guid>
					<description>Pretty much most people don't even use the =begin/=end blocks any more. I just write stuff like

# This function adds two numbers together.
# No overflow checking is provided.
def sum(a,b)
  a + b
end

It's easier to read and makes the comments more discernible.</description>
		<content:encoded><![CDATA[<p>Pretty much most people don&#8217;t even use the =begin/=end blocks any more. I just write stuff like</p>
<p># This function adds two numbers together.<br />
# No overflow checking is provided.<br />
def sum(a,b)<br />
  a + b<br />
end</p>
<p>It&#8217;s easier to read and makes the comments more discernible.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
