<span style="font-family: arial,sans-serif;">Repost because the original message was garbled...<br><br>I've found a bug in the Ruby bundle for Textmate.  Under certain
circumstances, using Control-Q to reformat comment code raises an
exception that spews error code into the source.</span><br style="font-family: arial,sans-serif;"><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">Is this the right forum to post bugs in Ruby bundles?</span><br style="font-family: arial,sans-serif;">

<br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">The problem occurs if you have a comment that contains a single
word that goes past column 79.  For example, in the following code the x's in the comment extend out to column 80:</span><br style="font-family: arial,sans-serif;"><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;"># xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span><br style="font-family: arial,sans-serif;">


<span style="font-family: arial,sans-serif;">def func(x,y)</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">  x+y</span><br style="font-family: arial,sans-serif;">

<span style="font-family: arial,sans-serif;">end</span><br style="font-family: arial,sans-serif;"><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">If you place the caret inside the comment and press control-Q you see the following:</span><br style="font-family: arial,sans-serif;">
<br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">/Applications/TextMate.app/Contents/SharedSupport/Bundles/Source.tmbundle/Support/bin/rubywrap.rb:365:in /bin/bash: +': invalid option</span><br style="font-family: arial,sans-serif;">


<span style="font-family: arial,sans-serif;">Usage:    /bin/bash [GNU long option] [option] ...</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    /bin/bash [GNU long option] [option] script-file ...</span><br style="font-family: arial,sans-serif;">


<span style="font-family: arial,sans-serif;">GNU long options:</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    --debug</span><br style="font-family: arial,sans-serif;">

<span style="font-family: arial,sans-serif;">    --dump-po-strings</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    --dump-strings</span><br style="font-family: arial,sans-serif;">


<span style="font-family: arial,sans-serif;">    --help</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    --init-file</span><br style="font-family: arial,sans-serif;">

<span style="font-family: arial,sans-serif;">    --login</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    --noediting</span><br style="font-family: arial,sans-serif;">

<span style="font-family: arial,sans-serif;">    --noprofile</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    --norc</span><br style="font-family: arial,sans-serif;">

<span style="font-family: arial,sans-serif;">    --posix</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    --rcfile</span><br style="font-family: arial,sans-serif;">

<span style="font-family: arial,sans-serif;">    --restricted</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    --verbose</span><br style="font-family: arial,sans-serif;">

<span style="font-family: arial,sans-serif;">    --version</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    --wordexp</span><br style="font-family: arial,sans-serif;">

<span style="font-family: arial,sans-serif;">Shell options:</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">    -irsD or -c command or -O shopt_option        (invocation only)</span><br style="font-family: arial,sans-serif;">


<span style="font-family: arial,sans-serif;">    -abefhkmnptuvxBCHP or -o optionwrite'</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">  from /Applications/TextMate.app/Contents/SharedSupport/Bundles/Source.tmbundle/Support/bin/rubywrap.rb:408</span><br style="font-family: arial,sans-serif;">


<span style="font-family: arial,sans-serif;">def func(x,y)</span><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">  x+y</span><br style="font-family: arial,sans-serif;">

<span style="font-family: arial,sans-serif;">end</span><br style="font-family: arial,sans-serif;"><br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">This doesn't happen if the word in the comment stops before column 80.</span><br style="font-family: arial,sans-serif;">


<br style="font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">This isn't an impossible scenario because it's easy to have a URL in your documentation that's more than 80 characters long.</span><br style="font-family: arial,sans-serif;">
<font style="font-family: arial,sans-serif;" color="#888888"><br></font><br clear="all"><br>-- <br>Bill McNeill<br><a href="http://staff.washington.edu/billmcn/index.shtml">http://staff.washington.edu/billmcn/index.shtml</a>