Issue #9954 has been updated by Nobuyoshi Nakada.


2.1.2p132 segfaults by your script, due to the access to the non-Hash object as a Hash object.
r46342 fixes it to return the converted result.

----------------------------------------
Bug #9954: Unexpected Hash Modification and Segmentation Fault with Named Arguments
https://bugs.ruby-lang.org/issues/9954#change-47279

* Author: Andrew M
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: core
* Target version: current: 2.2.0
* ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]
* Backport: 2.0.0: DONTNEED, 2.1: REQUIRED
----------------------------------------
While experimenting with named arguments in Ruby 2.1.2, I encountered some strange behavior where a hash was modified after being passed as a set of named arguments with the double-splat operator. While attempting to examine the issue further, I encountered a segmentation fault which I believe to be related.

I have attached a log of my experiment, and a `.rb` file which reproduces both the unexpected hash modification and the segfault.

---Files--------------------------------
segfault.rb (1.2 KB)
pry_sample_output.txt (35 KB)


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