• Dmitry Gutov's avatar
    * lisp/progmodes/ruby-mode.el (ruby-toggle-block): Guess the current block, · c3268831
    Dmitry Gutov authored
    not just expect to be at its beginning.  Adjust callees.
    Succeed when do-end block has no space before the pipe character.
    (ruby-brace-to-do-end): When the original block is one-liner,
    convert to multiline.  Reindent the result.
    * test/automated/ruby-mode-tests.el:
    (ruby-toggle-block-to-multiline): New test.
    (ruby-should-indent-buffer, ruby-toggle-block-to-do-end)
    (ruby-toggle-block-to-brace): Use buffer-string.
ruby-mode.el 62.9 KB