Skip to content

Commit 4cf6a00

Browse files
committed
Fix bug with 'ignorecase' on
The pattern for the start of an "end" was being matched by a "Class" constant.
1 parent 3e56518 commit 4cf6a00

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

etc/examples/indent/blocks.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ def foo
2828
puts h
2929
end
3030
end
31+
32+
module X
33+
Class.new do
34+
end
35+
end

indent/ruby.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ let s:ruby_deindent_keywords =
6464
"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
6565
" TODO: the do here should be restricted somewhat (only at end of line)?
6666
let s:end_start_regex =
67-
\ '\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
67+
\ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
6868
\ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
6969
\ '\|\<do:\@!\>'
7070

0 commit comments

Comments
 (0)