From: eregontp@... Date: 2021-01-23T10:31:19+00:00 Subject: [ruby-core:102214] [Ruby master Feature#16978] Ruby should not use realpath for __FILE__ Issue #16978 has been updated by Eregon (Benoit Daloze). vo.x (Vit Ondruch) wrote in #note-7: > In Fedora, to avoid duplication, we have openssl gem extracted into independent package, which links back to the StdLib to keep the Ruby functionality. What does it look like on the filesystem? Even if the package is split, the standard location could be used, no need for symlinks, isn't it? ---------------------------------------- Feature #16978: Ruby should not use realpath for __FILE__ https://bugs.ruby-lang.org/issues/16978#change-90061 * Author: vo.x (Vit Ondruch) * Status: Open * Priority: Normal ---------------------------------------- This is the simplest test case: ~~~ $ mkdir a $ echo "puts __FILE__" > a/test.rb $ ln -s a b $ ruby -Ib -e "require 'test'" /builddir/a/test.rb ~~~ This behavior is problematic, because Ruby should not know nothing about the `a` directory. It was not instructed to use it. I should always refer to the file using the original path and do not dig into the underlying details, otherwise depending on file system setup, one might be forced to used `File.realpath` everywhere trying to use `__FILE__`. -- https://bugs.ruby-lang.org/ Unsubscribe: