From: "wycats (Yehuda Katz)" Date: 2013-11-05T07:49:56+09:00 Subject: [ruby-core:58159] [ruby-trunk - Bug #9079][Open] Interpolated Symbol creates unnecessary intermediate String on the heap Issue #9079 has been reported by wycats (Yehuda Katz). ---------------------------------------- Bug #9079: Interpolated Symbol creates unnecessary intermediate String on the heap https://bugs.ruby-lang.org/issues/9079 Author: wycats (Yehuda Katz) Status: Open Priority: Normal Assignee: ko1 (Koichi Sasada) Category: Target version: ruby -v: ruby 2.0.0p343 (2013-10-31) [x86_64-linux] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN This case: x = "world" y = :"hello#{world}!" allocates one T_STRING according to ObjectSpace.count_objects. Since all of the concatenation happens as part of the symbol generation, it shouldn't be necessary to create a Ruby string. -- http://bugs.ruby-lang.org/