On Mon, Aug 12, 2002 at 12:42:04PM +0900, Dossy wrote:
> True.  Vim's = (reindent) doesn't Do The Right Thing for me and
> especially breaks when do/end is used instead of {}.
> 
> Before:
> 
>     [1, 2, 3].each do |x|
>         p x
>             p x
>     end
> 
> After =4j:
> 
>     [1, 2, 3].each do |x|
>     p x
>     p x
>     end

Works for me:

    [1, 2, 3].each do |x|
        p x
        p x
    end

Maybe you have an older buggier version of ruby.vim? I'm using this:
http://mugca.its.monash.edu.au/~djkea2/vim/syntax/ruby.vim
(it goes in $VIM/vim61b/syntax/ruby.vim or whatever your equivalent
directory is).