Project

General

Profile

Actions

Bug #9080

closed

ENV[key] produces three objects

Added by wycats (Yehuda Katz) almost 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.0.0p343 (2013-10-31) [x86_64-linux]
[ruby-core:58160]

Description

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.

Actions

Also available in: Atom PDF