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