Closes #2783
Currently, inserting a newline after a ruby method will incorrectly cause the following line to repeat the method header. This commit adds a test case to illustrate the bug.