This is a problem with the Ruby Macro that triggers on }. It's intended to skip past any } at the current position, the purpose being because of the snippet that inserts #{} when you type # in a string. This way you can type } to go past the end, just like if you were using smart typing. Unfortunately I can't figure out a good way to fix the macro to not screw up so badly when triggered the way you are doing it.
My suggest would be to remove both the } macro and the # snippet (the # snippet constantly annoys me because I type #{ and end up with # {{}} ), but at least one other person wants to keep the # snippet, so I'm not sure what the proper response is.
On Jan 8, 2006, at 1:09 PM, Frederik De Bleser wrote:
I found a bug while going through Why's (Poignant) Guide to Ruby.
Whenever you type the following string of characters in Ruby mode:
"#<#{}#{
if you follow up with a '}' (just the right bracket), you end up with
}"}#}<}#}{}}#}{
If you do it in a piece of text, it garbles up your entire file, adding a right bracket after every single character, making your file look like this:
}#} }T}h}e} }g}u}t}s} }o}f} }l}i}f}e} }f}o}r}c}e} }w}i}t}h}i}n} }D} w}e}m}t}h}y}'}s} }A}r}r}a}y} }c}l}a}s}s} }C}r}e}a}t}u}r}e} } } } } } }#} }G}e}t} }a} }m}e}t}a}c}l}a}s}s} }f}o}r} }t}h}i}s} }c}l}a}s}s} } } }d}e}f} }s}e}l}f}.}m}e}t}a}c}l}a}s}s};} }c}l}a}s}s} }<}<} }s}e} l}f};} }s}e}l}f};} }e}n}d};} }e}n}d}
This bug appears both in r847 and the latest r906.