indenting issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

indenting issue

Patrick Schless
I am getting incorrect indenting under a very specific condition.  In
a case statement, if the 'when' is testing against a string, and the
next line starts a 'do' block, the contents of the 'do' block do not
get indented.

The error occurs for both the 'loop do' and 'do |foo|' forms.

a = "b"

case a
when "a"
  loop do
  # indenting is now off by one
  end
# Still off
end
# back to normal

case a
when "a"

  loop do
  # off by one even if there is an empty line above the 'do'
  end
end

case a
when "a"
  puts a
  loop do
    # Indenting is ok if there is at least one non-empty,
non-commented line above it
  end
end
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel