diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2019-05-07 12:52:24 +0200 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-21 17:28:37 +0900 |
commit | fb85a428605265a8fd449b0702a4dd88cb6f3b20 (patch) | |
tree | 0e5f9df92b010b026cfab40a54a1778f55f93e61 /test/ruby/test_autoload.rb | |
parent | 887163beb8f27c5400cd04dbf98c474ed035526f (diff) |
Add an optional `inherit` argument to Module#autoload?
[Feature #15777]
Closes: https://github.com/ruby/ruby/pull/2173
Diffstat (limited to 'test/ruby/test_autoload.rb')
-rw-r--r-- | test/ruby/test_autoload.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_autoload.rb b/test/ruby/test_autoload.rb index d4e8f20899..0428e10525 100644 --- a/test/ruby/test_autoload.rb +++ b/test/ruby/test_autoload.rb @@ -54,6 +54,10 @@ p Foo::Bar assert_equal(true, b.const_defined?(:X)) assert_equal(tmpfile, a.autoload?(:X), bug4565) assert_equal(tmpfile, b.autoload?(:X), bug4565) + assert_equal(tmpfile, a.autoload?(:X, false)) + assert_equal(tmpfile, a.autoload?(:X, nil)) + assert_nil(b.autoload?(:X, false)) + assert_nil(b.autoload?(:X, nil)) assert_equal(true, a.const_defined?("Y")) assert_equal(true, b.const_defined?("Y")) assert_equal(tmpfile2, a.autoload?("Y")) |