Accessing the real file name of a symbolic linked file
问题 When a file is loaded/required via a symbolic link, all the methods, keywords, etc. that refer to a file name seem to refer to the link name, and not the real file name. For example, suppose I have a file foo.rb with its contents something like: puts __FILE__, __dir__, caller and a symbolic link bar.rb pointing to foo.rb . If I load/require foo.rb via the symbolic link bar.rb , then all of the file names given by the commands above describe the symbolic link name bar.rb , and not the real