Comment for partial line

Hi

Can someone confirm that Ruby only allows #tail of line commenting and
=begin
this
whole
block
commenting
=end

and not <some comment syntax here>partial line <end comment

commenting?

and if so, i request this be changed! its really annoying not being able
to do a partial line comment in rhtml

thanks

···

--
Posted via http://www.ruby-forum.com/\.

You can do HTML comments in RHTML you know. :wink:

--Jeremy

···

On 2/6/07, Xia __ <rebeccacannon@gmail.com> wrote:

Hi

Can someone confirm that Ruby only allows #tail of line commenting and
=begin
this
whole
block
commenting
=end

and not <some comment syntax here>partial line <end comment
>commenting?

and if so, i request this be changed! its really annoying not being able
to do a partial line comment in rhtml

thanks

--
Posted via http://www.ruby-forum.com/\.

--
http://www.jeremymcanally.com/

My free Ruby e-book:
http://www.humblelittlerubybook.com/book/

My blogs:

http://www.rubyinpractice.com/

Either, <!-- this commet style -->
or...

<% do_stuff; "comment on it"; do_more; "more comments" %>

but please, if you need to document a template... move that stuff into
the controller...

···

On 2/7/07, Xia __ <rebeccacannon@gmail.com> wrote:

Hi

Can someone confirm that Ruby only allows #tail of line commenting and
=begin
this
whole
block
commenting
=end

and not <some comment syntax here>partial line <end comment
>commenting?

and if so, i request this be changed! its really annoying not being able
to do a partial line comment in rhtml

thanks

--
Posted via http://www.ruby-forum.com/\.

its more for bug tracking; to be able to remove functionality
temporarily to see what is broken, so more like

<% do_stuff; /* HIDE THE FOLLOWING FROM RUBY do_more; */ %>

···

--
Posted via http://www.ruby-forum.com/.

that means that perhaps you have way too much logic in your template, and you
should better move that logic into the controller. it isn't just a matter of
taste, it's a matter of good design :).

HTH

···

On Wednesday 07 February 2007 02:55, Xia __ wrote:

its more for bug tracking; to be able to remove functionality
temporarily to see what is broken, so more like

<% do_stuff; /* HIDE THE FOLLOWING FROM RUBY do_more; */ %>

--
pub 1024D/8D2787EF 723C 7CA3 3C19 2ACE 6E20 9CC1 9956 EB3C 8D27 87EF

too much logic being a rails form helper?

···

--
Posted via http://www.ruby-forum.com/.

i dont want to turn this thread into a debate about programming design,
i just want to know if ruby offers a fairly simple syntax function which
is available in many languages.

···

--
Posted via http://www.ruby-forum.com/.

no.

···

On 2/7/07, Xia __ <rebeccacannon@gmail.com> wrote:

i dont want to turn this thread into a debate about programming design,
i just want to know if ruby offers a fairly simple syntax function which
is available in many languages.

On Behalf Of Xia __:
# i dont want to turn this thread into a debate about
# programming design,
# i just want to know if ruby offers a fairly simple syntax
# function which is available in many languages.

the ff is just a kludge. i enclose them text inside single quotes, or %< >, or %<-- -->

irb(main):041:0> print "Hello, "; 'this wont run; puts "NO!"'; print "world\n"
Hello, world
=> nil
irb(main):042:0> print "Hello, "; %<this wont run; puts "NO!">; print "world\n"
Hello, world
=> nil
irb(main):046:0> print "Hello, "; %<--NONONO!-->; print "world.\n"
Hello, world.
=> nil

Hey, about an rcr, use "--" or "++" as inline commenters :))

But sincerely, i have a phobia of inline comments. I once had a bug that took me a day (24hrs) to find because of a very slick inline comment i inserted... arrghh.. but that was then. Now, unit test/tdd/bdd/rspec/ioc rocks. no fear :slight_smile:

kind regards -botp

Michael Fellinger wrote:

···

On 2/7/07, Xia __ <rebeccacannon@gmail.com> wrote:

i dont want to turn this thread into a debate about programming design,
i just want to know if ruby offers a fairly simple syntax function which
is available in many languages.

no.

cool thanks michael.

i think there may be some argument for it to be supported in the case of
erb in rhtml; mostly due to common html markup style which is different
to ruby due to line spacing and inline elements in html

--
Posted via http://www.ruby-forum.com/\.

So you are really after a debate then :wink:

···

On 2/7/07, Xia __ <rebeccacannon@gmail.com> wrote:

Michael Fellinger wrote:
> On 2/7/07, Xia __ <rebeccacannon@gmail.com> wrote:
>> i dont want to turn this thread into a debate about programming design,
>> i just want to know if ruby offers a fairly simple syntax function
which
>> is available in many languages.
>
> no.

cool thanks michael.

i think there may be some argument for it to be supported in the case of
erb in rhtml; mostly due to common html markup style which is different
to ruby due to line spacing and inline elements in html

-

no comment...

···

--
Posted via http://www.ruby-forum.com/.

Xia __ wrote:

no comment...

I thought that was the problem? :slight_smile:

···

--
Alex