I am using RubyMine 6.3.2. When I type the following line and press return/enter:
# This is a comment.
the editor inserts additional text, r
It is a bug: http://youtrack.jetbrains.com/issue/RUBY-15127 It was fixed in 6.3.3, which was released yesterday: http://blog.jetbrains.com/ruby/2014/06/rubymine-6-3-3-rspec-3-code-insight-other-fixes/
This duplicate bug report http://youtrack.jetbrains.com/issue/RUBY-15195 gives a workaround, which is to go to RubyMine's registry (Control-Shift-A and type "registry") and uncheck "show.live.templates.in.completion". That works, and it revealed to me the existence of RubyMine's registry, so that's cool.