Issue #9080 has been reported by wycats (Yehuda Katz).

----------------------------------------
Bug #9080: ENV[key] produces three objects
https://bugs.ruby-lang.org/issues/9080

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 code:

  ENV["HOME"]

allocates three T_STRING according to ObjectSpace.count_objects. Unless I'm missing something, it should only need to allocate one string.


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