diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-24 14:41:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-24 14:41:17 +0000 |
commit | ab69aba3ecd8d5fda8bc9ae2998228147267df9b (patch) | |
tree | e1c74965f16b6df7bbbafc9e70a267850edf843e /test/ruby/test_defined.rb | |
parent | d3326ddf1113a0b0788658e5ef6131f2722ab3c4 (diff) | |
download | ruby-ab69aba3ecd8d5fda8bc9ae2998228147267df9b.tar.gz |
* test/ruby/test_defined.rb (TestDefined#test_autoloaded_noload):
autoload file should no be loaded.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_defined.rb')
-rw-r--r-- | test/ruby/test_defined.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_defined.rb b/test/ruby/test_defined.rb index 6a1f702648..de64ac46f8 100644 --- a/test/ruby/test_defined.rb +++ b/test/ruby/test_defined.rb @@ -105,6 +105,8 @@ class TestDefined < Test::Unit::TestCase end def test_autoloaded_noload + loaded = $".dup + $".clear klass = Class.new do autoload(:A, "a") def a? @@ -113,5 +115,8 @@ class TestDefined < Test::Unit::TestCase end x = klass.new assert_equal("constant", x.a?) + assert_equal([], $") + ensure + $".replace(loaded) end end |