The attached patch adds extensive documentation and tests to the `ruby-forward-string' function. This may seem an odd function to document thoroughly, but I spent quite a while wrapping my head around the exact behavior and I want to spare the next person. It also underlies some important parsing functionality in ruby-mode. Note the one test which is expected to fail: this represents an outstanding bug in `ruby-forward-string`. I'll be (immediately) following this report with a patch which fixes *that* issue, but it didn't seem prudent to combine the commits. -- Cameron Desautels