summaryrefslogtreecommitdiff
path: root/spec/ruby/library/objectspace/dump_all_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2023-06-26 15:55:11 +0200
committerBenoit Daloze <eregontp@gmail.com>2023-06-26 15:55:11 +0200
commit515bd4214497b3af02f6eef51b496ad9a0cf6b3b (patch)
tree4554360d275a3bb9dc696f952b8f3d1bcd88f18a /spec/ruby/library/objectspace/dump_all_spec.rb
parentf73fa299279ac322bd921691d1ba0e8bf2b39b5f (diff)
Update to ruby/spec@30e1c35
Diffstat (limited to 'spec/ruby/library/objectspace/dump_all_spec.rb')
-rw-r--r--spec/ruby/library/objectspace/dump_all_spec.rb38
1 files changed, 18 insertions, 20 deletions
diff --git a/spec/ruby/library/objectspace/dump_all_spec.rb b/spec/ruby/library/objectspace/dump_all_spec.rb
index dbf5bf1f76..e9b449a905 100644
--- a/spec/ruby/library/objectspace/dump_all_spec.rb
+++ b/spec/ruby/library/objectspace/dump_all_spec.rb
@@ -55,27 +55,25 @@ describe "ObjectSpace.dump_all" do
stdout.should == "File\ntrue\n"
end
- ruby_version_is "3.0" do
- it "dumps Ruby heap to a temporary file when passed output: :nil" do
- stdout = ruby_exe(<<~RUBY, options: "-robjspace")
- string = "abc"
- file = ObjectSpace.dump_all(output: nil)
-
- begin
- file.flush
- file.rewind
- content = file.read
-
- puts file.class
- puts content.include?('"value":"abc"')
- ensure
- file.close
- File.unlink file.path
- end
- RUBY
-
- stdout.should == "File\ntrue\n"
+ it "dumps Ruby heap to a temporary file when passed output: :nil" do
+ stdout = ruby_exe(<<~RUBY, options: "-robjspace")
+ string = "abc"
+ file = ObjectSpace.dump_all(output: nil)
+
+ begin
+ file.flush
+ file.rewind
+ content = file.read
+
+ puts file.class
+ puts content.include?('"value":"abc"')
+ ensure
+ file.close
+ File.unlink file.path
end
+ RUBY
+
+ stdout.should == "File\ntrue\n"
end
it "dumps Ruby heap to stdout when passed output: :stdout" do