Issue #10541 has been updated by Recursive Madman.


> It has been the cause of real problems. http://status.cloudamqp.com/incidents/vj62pnp62tj9

I'd say the "cause" of the problem described in that article is that they deployed code to production without any testing or review. It's not directly a problem with the interpolation syntax, but the way it was used.

> If I came across this code in the wild, I would be surprised by this behavior:
> ```
> # ...
> password = CGI.escape("wordP#@ss")
> # ...
> ```

If you do not want string interpolation, you can just use single quotes. But it is indeed rather surprising to have passwords in source code.

> Perhaps it needs to be used more so more Rubyists know about it...

I agree. Also Ruby tutorials / books should mention it when introducing interpolation syntax in general. The problem linked by the OP could be avoided by a rule of thumb, such as "don't use it when the string is subject to change" (or likely to be copy/pasted and then altered).

----------------------------------------
misc #10541: Remove shorthand string interpolation syntax
https://bugs.ruby-lang.org/issues/10541#change-50093

* Author: Daniel Morrison
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category: syntax
* Target version: current: 2.2.0
----------------------------------------
I would like to see the shorthand string interpolation syntax, "foo#@bar" deprecated and then removed in 3.0.

My reasons:

1. Most experienced Ruby developers I've talked to don't even know it exists.
2. It has been the cause of real problems. http://status.cloudamqp.com/incidents/vj62pnp62tj9

When a syntax is not widely known and has the potential for problems, I think it makes sense to deprecate and remove. 



-- 
https://bugs.ruby-lang.org/