From: "ko1 (Koichi Sasada)" Date: 2013-09-14T02:53:56+09:00 Subject: [ruby-core:57179] [ruby-trunk - Feature #8906][Open] Freeze Symbols Issue #8906 has been reported by ko1 (Koichi Sasada). ---------------------------------------- Feature #8906: Freeze Symbols https://bugs.ruby-lang.org/issues/8906 Author: ko1 (Koichi Sasada) Status: Open Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: core Target version: current: 2.1.0 Now, Integer and Float objects are frozen objects. How about to freeze Symbol objects, too? I think Symbol is friend of Integer. Current behavior: p :foo.frozen? #=> false :foo.instance_variable_set(:@foo, 1) p :foo.instance_variable_get(:@foo) #=> 1 ---- Background of this proposal: Now, I'm working on "GC-able Symbols" feature. Freezing symbols make this feature easier. for example: (1) set an instance variable @iv for symbol s (2) collect s (3) generate s (4) what value of @iv for s returns? -- http://bugs.ruby-lang.org/