mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_autoload.rb: clear autoloaded paths.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
871cd27c8d
commit
2417bd10d2
1 changed files with 2 additions and 0 deletions
|
@ -151,6 +151,7 @@ p Foo::Bar
|
|||
end
|
||||
|
||||
def add_autoload(path)
|
||||
(@autoload_paths ||= []) << path
|
||||
eval <<-END
|
||||
class ::Object
|
||||
autoload :AutoloadTest, #{path.dump}
|
||||
|
@ -159,6 +160,7 @@ p Foo::Bar
|
|||
end
|
||||
|
||||
def remove_autoload_constant
|
||||
$".replace($" - @autoload_paths)
|
||||
eval <<-END
|
||||
class ::Object
|
||||
remove_const(:AutoloadTest)
|
||||
|
|
Loading…
Reference in a new issue