summaryrefslogtreecommitdiff
path: root/test/-ext-/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-25 22:29:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-25 22:29:16 +0000
commit5ebce690df58beac176fb009726952cd304e75dc (patch)
tree939607d434077dd4ec3131c25978b9e86904fd65 /test/-ext-/win32
parent7f6a2e4a60ceb7cec9b7a41a1acc151a1db1ceb9 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-/win32')
-rw-r--r--test/-ext-/win32/test_dln.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/-ext-/win32/test_dln.rb b/test/-ext-/win32/test_dln.rb
index a6eedce1641..3624346a560 100644
--- a/test/-ext-/win32/test_dln.rb
+++ b/test/-ext-/win32/test_dln.rb
@@ -8,19 +8,19 @@ module Bug
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
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