diff options
Diffstat (limited to 'test/open-uri/test_open-uri.rb')
-rw-r--r-- | test/open-uri/test_open-uri.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb index 72ebcdb0da..afdd63ae85 100644 --- a/test/open-uri/test_open-uri.rb +++ b/test/open-uri/test_open-uri.rb @@ -902,5 +902,13 @@ class TestOpenURI < Test::Unit::TestCase } end -end + def test_meta_init_doesnt_bump_global_constant_state + skip "RubyVM.stat not defined" unless defined? RubyVM.stat + + OpenURI::Meta.init(Object.new) # prewarm + before = RubyVM.stat(:global_constant_state) + OpenURI::Meta.init(Object.new) + assert_equal 0, RubyVM.stat(:global_constant_state) - before + end +end |