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

ruby-changes:44173

From: nobu <ko1@a...>
Date: Mon, 26 Sep 2016 07:29:58 +0900 (JST)
Subject: [ruby-changes:44173] nobu:r56245 (trunk): test_dln.rb: fix constants

nobu	2016-09-26 07:29:16 +0900 (Mon, 26 Sep 2016)

  New Revision: 56245

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56245

  Log:
    test_dln.rb: fix constants
    
    * test/-ext-/win32/test_dln.rb (test_check_imported): use toplevel
      constants explicitly to get rid of constants under the scope.

  Modified files:
    trunk/test/-ext-/win32/test_dln.rb
Index: test/-ext-/win32/test_dln.rb
===================================================================
--- test/-ext-/win32/test_dln.rb	(revision 56244)
+++ test/-ext-/win32/test_dln.rb	(revision 56245)
@@ -8,19 +8,19 @@ module Bug https://github.com/ruby/ruby/blob/trunk/test/-ext-/win32/test_dln.rb#L8
     class TestDln < Test::Unit::TestCase
       def test_check_imported
         bug = '[Bug #6303]'
-        so = File.expand_path("../ext/-test-/win32/dln/dlntest.dll", EnvUtil.rubybin)
-        assert_send([File, :file?, so])
-        path = ENV['PATH']
-        path = File.dirname(so) + RbConfig::CONFIG["PATH_SEPARATOR"] + path
+        so = ::File.expand_path("../ext/-test-/win32/dln/dlntest.dll", ::EnvUtil.rubybin)
+        assert_send([::File, :file?, so])
+        path = ::ENV['PATH']
+        path = ::File.dirname(so) + ::RbConfig::CONFIG["PATH_SEPARATOR"] + path
         assert_in_out_err([{'PATH'=>path}, '-r-test-/win32/dln', '-eexit'], '', [], [], bug, timeout: 10)
       end
 
       def test_nonascii_load
         bug9699 = '[ruby-core:61845] [Bug #9699]'
-        so = "-test-/dln/empty." + RbConfig::CONFIG["DLEXT"]
+        so = "-test-/dln/empty." + ::RbConfig::CONFIG["DLEXT"]
         so = $:.find {|d| d = ::File.join(d, so); break d if ::File.exist?(d)}
         assert_not_nil(so)
-        Dir.mkdir(dir = ::File.join(testdir = Dir.mktmpdir("test"), "\u{30c6 30b9 30c8}"))
+        ::Dir.mkdir(dir = ::File.join(testdir = ::Dir.mktmpdir("test"), "\u{30c6 30b9 30c8}"))
         ::File.copy_stream(so, ::File.join(dir, ::File.basename(so)))
         assert_separately(['-', bug9699, testdir, ::File.basename(so)], <<-'end;')
           bug, dir, so = *ARGV
@@ -30,8 +30,8 @@ module Bug https://github.com/ruby/ruby/blob/trunk/test/-ext-/win32/test_dln.rb#L30
         end;
       ensure
         ::File.unlink(::File.join(dir, ::File.basename(so))) rescue nil
-        Dir.rmdir(dir) rescue nil
-        Dir.rmdir(testdir) rescue nil
+        ::Dir.rmdir(dir) rescue nil
+        ::Dir.rmdir(testdir) rescue nil
       end
 
     end

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

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