[前][次][番号順一覧][スレッド一覧]

ruby-changes:66787

From: Nobuyoshi <ko1@a...>
Date: Thu, 15 Jul 2021 09:26:18 +0900 (JST)
Subject: [ruby-changes:66787] c67c83fb68 (master): [ruby/fiddle] Module file name may be the realpath

https://git.ruby-lang.org/ruby.git/commit/?id=c67c83fb68

From c67c83fb68e2f514f359633da12b59d93d7dda5a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 15 Jul 2021 09:19:58 +0900
Subject: [ruby/fiddle] Module file name may be the realpath

Even when the path which was used to dlopen may be a symlink.
---
 test/fiddle/test_handle.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/fiddle/test_handle.rb b/test/fiddle/test_handle.rb
index b7c628c..54ae0aa 100644
--- a/test/fiddle/test_handle.rb
+++ b/test/fiddle/test_handle.rb
@@ -115,7 +115,7 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/test/fiddle/test_handle.rb#L115
     def test_file_name
       file_name = Handle.new(LIBC_SO).file_name
       assert_kind_of String, file_name
-      expected = File.basename(LIBC_SO)
+      expected = File.basename(File.realpath(LIBC_SO))
       basename = File.basename(file_name)
       if File::FNM_SYSCASE.zero?
         assert_equal expected, basename
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]