On 2002.08.13, Gavin Sinclair <gsinclair / soyabean.com.au> wrote:
> Two points:
> 
> 1. You can use :scr[iptnames] to find out which scripts/plugins have been
> sourced.

Thanks.

Interestingly, :scr shows that $VIMRUNTIME/indent.vim isn't loaded.
Adding "so $VIMRUNTIME/indent.vim" now properly loads
$VIMRUNTIME/indent/ruby.vim for me.

> 2. I've become the maintainter of the ruby indent file, unless anyone
> disagrees ;)  I'm no good at writing indent rules yet.  Any bug
> reports/solutions much appreciated.  At the moment there are two that
> I'm aware of (the follwing are vim-indented)
> 
> def cartesianProduct(denumerable, &productBlock) #finite,finite is broken :-(
> d = self.class.new
> end

Well, you didn't put a URL to the "latest" indent/ruby.vim file, so
here's a patch off the one I've currently got:

======================================================================
--- /usr/share/vim/vim61/indent/ruby.vim        Sun Apr 14 14:48:26 2002
+++ ruby.vim    Mon Aug 12 11:59:05 2002
@@ -30,8 +30,9 @@
     return 0
   endif
 
-  " If the line trailed with a *, +, comma, . or (, trust the user
-  if getline(lnum) =~ '\(\*\|\.\|+\|,\|(\)\(\s*#.*\)\=$'
+  " If the line trailed with a *, +, comma, . or ( but not in a comment,
+  " trust the user
+  if getline(lnum) =~ '\(\[^#\].*\)?\(\*\|\.\|+\|,\|(\)\(\s*#.*\)\=$'
     return -1
   endif
======================================================================

I don't know if this Does The Right Thing for all other cases,
but it seems to do the right thing with the test case you provided.

-- Dossy

-- 
Dossy Shiobara                       mail: dossy / panoptic.com 
Panoptic Computer Network             web: http://www.panoptic.com/ 
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)