summaryrefslogtreecommitdiff
path: root/test/ruby/test_autoload.rb
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-10 05:10:13 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-10 05:10:13 +0000
commit18b2cee2069d57d80c67faee84d9c0c906cbb1b7 (patch)
tree17cfc0cc31d401ad8d19626b143a460e0288c5e9 /test/ruby/test_autoload.rb
parent6726038d761cbe3b4ac786de102e5c498c068b4e (diff)
revert r63387 and r63389 for now
I can't reproduce the problem on my 32-bit machine, and I have connectivity problems to my 64-bit systems at the moment. Will revisit in a few hours hopefully. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_autoload.rb')
-rw-r--r--test/ruby/test_autoload.rb36
1 files changed, 0 insertions, 36 deletions
diff --git a/test/ruby/test_autoload.rb b/test/ruby/test_autoload.rb
index 8311c40c35..3095052a81 100644
--- a/test/ruby/test_autoload.rb
+++ b/test/ruby/test_autoload.rb
@@ -311,42 +311,6 @@ p Foo::Bar
end
end if Process.respond_to?(:fork)
- def test_autoload_same_file
- Dir.mktmpdir('autoload') do |tmpdir|
- File.write("#{tmpdir}/b.rb", "#{<<~'begin;'}\n#{<<~'end;'}")
- begin;
- module Foo; end
- module Bar; end
- end;
- 3.times do # timing-dependent, needs a few times to hit [Bug #14742]
- assert_separately(%W[-I #{tmpdir}], "#{<<-'begin;'}\n#{<<-'end;'}")
- begin;
- autoload :Foo, 'b'
- autoload :Bar, 'b'
- t1 = Thread.new do Foo end
- t2 = Thread.new do Bar end
- t1.join
- t2.join
- bug = '[ruby-core:86935] [Bug #14742]'
- assert_instance_of Module, t1.value, bug
- assert_instance_of Module, t2.value, bug
- end;
- end
- end
- end
-
- def test_no_leak
- assert_no_memory_leak([], '', <<~'end;', 'many autoloads', timeout: 30)
- 200000.times do |i|
- m = Module.new
- m.instance_eval do
- autoload :Foo, 'x'
- autoload :Bar, i.to_s
- end
- end
- end;
- end
-
def add_autoload(path)
(@autoload_paths ||= []) << path
::Object.class_eval {autoload(:AutoloadTest, path)}