Actions
Feature #9667
openOptimization of __FILE__ and __dir__
Feature #9667:
Optimization of __FILE__ and __dir__
Status:
Open
Assignee:
-
Target version:
-
Description
In the same spirit as the string literal followed by freeze is optimized, I think __FILE__ and __dir__ should be optimized. Currently, they return different object id each time they are called.
I propose them to be optimized so that they are only created once per occurrence.
Updated by sawa (Tsuyoshi Sawada) over 12 years ago
Sorry, my examples were inappropriate. Please ignore the examples above.
Currently, different object id is returned each time:
I propose them to be optimized so that they are only created once per occurrence.
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
test/rubygems/test_gem.rb fails at untainting __FILE__, when parallel test.
Actions