[TxMt] Bug in Ruby bundle: Control-Q comment reformatting produces an error for long words
Bill McNeill
billmcn at gmail.com
Tue Mar 25 18:22:57 UTC 2008
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.
Is this the right forum to post bugs in Ruby bundles?
The problem occurs if you have a comment that contains a single word that
goes past column 79. For example, in the following code (also attached) the
x's in the comment extend out to column 80:
#
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
def func(x,y)
x+y
end
If you place the caret inside the comment and press control-Q you see the
following:
/Applications/TextMate.app/Contents/SharedSupport/Bundles/Source.tmbundle/Support/bin/rubywrap.rb:365:in
/bin/bash: +': invalid option
Usage: /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o optionwrite'
from
/Applications/TextMate.app/Contents/SharedSupport/Bundles/Source.tmbundle/Support/bin/rubywrap.rb:408
def func(x,y)
x+y
end
This doesn't happen if the word in the comment stops before column 80.
This isn't an impossible scenario because it's easy to have a URL in your
documentation that's more than 80 characters long.
--
Bill McNeill
http://staff.washington.edu/billmcn/index.shtml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20080325/2b6a0a9e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: comment-reformat-bug.rb
Type: application/octet-stream
Size: 103 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20080325/2b6a0a9e/attachment.rb>
More information about the textmate
mailing list