Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug with 'ignorecase' on

The pattern for the start of an "end" was being matched by a "Class"
constant.
  • Loading branch information...
commit 4cf6a00a1e9cc0c5404fc2c11447716b5abc1ce7 1 parent 3e56518
@AndrewRadev AndrewRadev authored
Showing with 6 additions and 1 deletion.
  1. +5 −0 etc/examples/indent/blocks.rb
  2. +1 −1  indent/ruby.vim
View
5 etc/examples/indent/blocks.rb
@@ -28,3 +28,8 @@ def foo
puts h
end
end
+
+module X
+ Class.new do
+ end
+end
View
2  indent/ruby.vim
@@ -64,7 +64,7 @@ let s:ruby_deindent_keywords =
"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
" TODO: the do here should be restricted somewhat (only at end of line)?
let s:end_start_regex =
- \ '\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
+ \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
\ '\|\<do:\@!\>'
Please sign in to comment.
Something went wrong with that request. Please try again.