Issue #10997 has been reported by Johan Kim.

----------------------------------------
Bug #10997: String in Hash 'prepend', '<<' bug
https://bugs.ruby-lang.org/issues/10997

* Author: Johan Kim
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
i used with Rails console

**Only String is great**
```
original = "a" #=> "a"
clone = original.clone #=> "a"
clone.prepend("prepend_") #=> "prepend_a"
clone #=> "prepend_a"
original #=> "a"
```
**but String in Hash then get some issue**
```
original = { a: "a" } #=> {:a=>"a"}
clone = original.clone #=> {:a=>"a"}
clone[:a].prepend("prepend_") #=> "prepend_a"
clone #=> {:a=>"prepend_a"}
original #=> {:a=>"prepend_a"}
```
i expect `original` to `{:a=>"a"}`
**and when you use literal then works**
```
original = { a: "a" } #=> {:a=>"a"}
clone = original.clone #=> {:a=>"a"}
clone[:a] = "prepend_#{clone[:a]}" #=> "prepend_a"
clone #=> {:a=>"prepend_a"}
original #=> {:a=>"a"}
```

`<<` has same issue too.




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