The vim ruby syntax seems to screw up comments that have multiple hashes. E.g. I like to differentiate
### section heading comments,
## non-inline comments, and
x = a + b # inline comments
But reformatting the comments (e.g. with “gq}”) always screws them up, unless you do:
$ mkdir -p ~/.vim/after/syntax
$ cat > ~/.vim/after/syntax/ruby.vim
set comments=n:#
which tells vim that multiple hash marks are ok.