aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_autoload.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-13 09:34:37 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-13 09:34:37 +0000
commit66652bb6322ed7ba17c1e8485aee2701e9cadded (patch)
treeb44b5f68b1978d1f802316a27bc15a0d41207184 /test/ruby/test_autoload.rb
parenta6a596a5bdb8cdefe54946bcf9892835c3f87c18 (diff)
downloadruby-66652bb6322ed7ba17c1e8485aee2701e9cadded.tar.gz
revert r62392
check the declaration of `rb_autoloading_value()` in vm_core.h and the call in vm_insnhelper.c, and retry it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_autoload.rb')
-rw-r--r--test/ruby/test_autoload.rb40
1 files changed, 0 insertions, 40 deletions
diff --git a/test/ruby/test_autoload.rb b/test/ruby/test_autoload.rb
index 0220f3e27d..9d16a45e23 100644
--- a/test/ruby/test_autoload.rb
+++ b/test/ruby/test_autoload.rb
@@ -245,46 +245,6 @@ p Foo::Bar
assert_ruby_status([script], '', '[ruby-core:81016] [Bug #13526]')
end
- def test_autoload_private_constant
- Dir.mktmpdir('autoload') do |tmpdir|
- File.write(tmpdir+"/zzz.rb", "#{<<~"begin;"}\n#{<<~'end;'}")
- begin;
- class AutoloadTest
- ZZZ = :ZZZ
- private_constant :ZZZ
- end
- end;
- assert_separately(%W[-I #{tmpdir}], "#{<<-"begin;"}\n#{<<-'end;'}")
- bug = '[ruby-core:85516] [Bug #14469]'
- begin;
- class AutoloadTest
- autoload :ZZZ, "zzz.rb"
- end
- assert_raise(NameError, bug) {AutoloadTest::ZZZ}
- end;
- end
- end
-
- def test_autoload_deprecate_constant
- Dir.mktmpdir('autoload') do |tmpdir|
- File.write(tmpdir+"/zzz.rb", "#{<<~"begin;"}\n#{<<~'end;'}")
- begin;
- class AutoloadTest
- ZZZ = :ZZZ
- deprecate_constant :ZZZ
- end
- end;
- assert_separately(%W[-I #{tmpdir}], "#{<<-"begin;"}\n#{<<-'end;'}")
- bug = '[ruby-core:85516] [Bug #14469]'
- begin;
- class AutoloadTest
- autoload :ZZZ, "zzz.rb"
- end
- assert_warning(/ZZZ is deprecated/, bug) {AutoloadTest::ZZZ}
- end;
- end
- end
-
def add_autoload(path)
(@autoload_paths ||= []) << path
::Object.class_eval {autoload(:AutoloadTest, path)}