commenting code

Here's one stupid question:

How do you comment out a block of ruby code?

I know that "#" comments one line, but how do i comment out a block of 7-8 lines of code? Don't seem to be able to find this anywhere.

Thanks,

Gabor

There is no block comment, but some editors support easy multi-line commenting

In TextMate, for instance, it’s the menu item Bundles>Source>Comment Selection.

There is block commenting:

=begin stuff to get commented =end

The tokens have to be flush to the left.

Jason

Sweet!

I just tried in SciTE and for it, it appears the ‘begin’ is opional but the ‘end’ is required.

Thanks Jason! Really useful to know this.

Best,

Gabor

Jason Roelofs wrote: