Project

General

Profile

Actions

Bug #9080

closed

ENV[key] produces three objects

Added by wycats (Yehuda Katz) over 10 years ago. Updated over 8 years ago.

Status:
Closed
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

Like0
Like0Like0