From: Mike Gold Date: 2008-12-13T04:10:56+09:00 Subject: Re: why Hash corrupts 'key' object ? Brian Adkins wrote: > Mike Gold writes: > >> rb_str_new4(orig) >> >> The docs could be made clearer: An _unfrozen_ String passed as a key >> will be duplicated and frozen. > > That doesn't answer my question. I showed that dup+freeze did not > adversely affect TestStr (i.e. dupstr was still accessible), so > something else is going on. You passed in a frozen String, so Hash#[]= did not touch it. So it was not adversely affected. Could you write an assertion which you think should succeed but doesn't? -- Posted via http://www.ruby-forum.com/.