Skip to content

Commit

Permalink
allow for, while and until loop bodies to contain do...end blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
dkearns committed Aug 18, 2003
1 parent fc7c087 commit f7f4f82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
2003-08-18 Doug Kearns <djkea2@mugca.its.monash.edu.au>

* syntax/ruby.vim: allow for, while and until loop bodies to contain
do...end and {...} blocks - rubyOptDoBlock should contain rubyDoBlock
and rubyCurlyBlock.

2003-08-16 Doug Kearns <djkea2@mugca.its.monash.edu.au>

* 18944: syntax/ruby.vim: string expression substitution of class
variables does not require braces.
* syntax/ruby.vim: string expression substitution of class variables
does not require braces.

2 changes: 1 addition & 1 deletion syntax/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ if !exists("ruby_no_expensive")
syn region rubyNoDoBlock matchgroup=rubyControl start="\<\(case\|begin\)\>" start="^\s*\(if\|unless\)\>" start=";\s*\(if\|unless\)\>"hs=s+1 end="\<end\>" contains=ALLBUT,rubyExprSubst,rubyTodo fold

" statement with optional *do*
syn region rubyOptDoBlock matchgroup=rubyControl start="\<for\>" start="^\s*\(while\|until\)\>" start=";\s*\(while\|until\)\>"hs=s+1 end="\<end\>" contains=ALLBUT,rubyExprSubst,rubyTodo,rubyDoBlock,rubyCurlyBlock fold
syn region rubyOptDoBlock matchgroup=rubyControl start="\<for\>" start="^\s*\(while\|until\)\>" start=";\s*\(while\|until\)\>"hs=s+1 end="\<end\>" contains=ALLBUT,rubyExprSubst,rubyTodo fold

if !exists("ruby_minlines")
let ruby_minlines = 50
Expand Down

0 comments on commit f7f4f82

Please sign in to comment.