diff options
| author | Adam Hess <adamhess1991@gmail.com> | 2023-10-12 11:15:53 -0700 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-12-07 15:52:35 -0500 |
| commit | 6816e8efcff3be75f8020cd1b0ea57d3cd664bbc (patch) | |
| tree | 8f8484b955ba25e9df6a2038db0f156e7cbf71e4 /test | |
| parent | b361a800c22e0248bf126d77e96a7bd4f9c34d1b (diff) | |
Free everything at shutdown
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_rubyoptions.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 16cff9754a..eb10ed6aec 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -1227,4 +1227,10 @@ class TestRubyOptions < Test::Unit::TestCase omit "#{IO::NULL} is not a character device" unless File.chardev?(IO::NULL) assert_in_out_err([IO::NULL], success: true) end + + def test_free_on_exit_env_var + env = {"RUBY_FREE_ON_EXIT"=>"1"} + assert_ruby_status([env, "-e;"]) + assert_in_out_err([env, "-W"], "", [], /Free on exit is experimental and may be unstable/) + end end |
