From a75bc36dd27006ef5534da44c1cf2af4a1cbd171 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 3 Jun 2017 14:40:05 +0000 Subject: file.c: preserve encoding * file.c (path_check_0): preserve encoding of path name in warning message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_require.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/ruby/test_require.rb') diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index 44c142e88c..7dc7b4eb49 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -170,6 +170,9 @@ class TestRequire < Test::Unit::TestCase end assert_include(e.message, "loading from unsafe path") assert_include(stderr, "Insecure world writable dir") + require_path = require_path.encode(self.class.ospath_encoding(require_path)) + assert_include(e.message, require_path) + assert_include(stderr, File.dirname(require_path)) } end -- cgit v1.2.3