From: Mark Slagell Date: 2001-07-05T23:06:43+09:00 Subject: [ruby-talk:17300] Re: /* */ comments Michael Neumann wrote: >Has someone told, that we have already something like >multiline comments? > >Just make the piece of code you want to comment out >a string with %{ .... }. It's also possible to nest them. > >For example Python users often use this (with """ thus not nestable), >especially for documenting classes/methods. > >The only problem I can see is that if it occurs at the end of a method/block >it's taken as return value. > >Regards, > > Michael > > Should note here that when you use %{...} some processing of the "comment" string does occur. ---------- x = 1 %{ stuff commented out might include something like #{x=x+1} end of comment... } x #-> 2 ---------- %q{...} is safe though. -- Mark