mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Prevent a warning "Expected ... to define AutoloadTest but it didn't"
related: [Bugs #18813] and eca31d24d6
This commit is contained in:
parent
8d689294d0
commit
078db98da4
1 changed files with 3 additions and 0 deletions
|
@ -150,6 +150,7 @@ p Foo::Bar
|
|||
end
|
||||
|
||||
def test_nameerror_when_autoload_did_not_define_the_constant
|
||||
verbose_bak, $VERBOSE = $VERBOSE, nil
|
||||
Tempfile.create(['autoload', '.rb']) {|file|
|
||||
file.puts ''
|
||||
file.close
|
||||
|
@ -162,6 +163,8 @@ p Foo::Bar
|
|||
remove_autoload_constant
|
||||
end
|
||||
}
|
||||
ensure
|
||||
$VERBOSE = verbose_bak
|
||||
end
|
||||
|
||||
def test_override_autoload
|
||||
|
|
Loading…
Reference in a new issue