[前][次][番号順一覧][スレッド一覧]

ruby-changes:69526

From: Benoit <ko1@a...>
Date: Sat, 30 Oct 2021 05:00:23 +0900 (JST)
Subject: [ruby-changes:69526] a954f273a8 (master): Cleanup GC.auto_compact spec

https://git.ruby-lang.org/ruby.git/commit/?id=a954f273a8

From a954f273a89f517de188bdd77e73a80a9c9dad2c Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Fri, 29 Oct 2021 21:59:35 +0200
Subject: Cleanup GC.auto_compact spec

* Make the supported check more obvious.
---
 spec/ruby/core/gc/auto_compact_spec.rb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/spec/ruby/core/gc/auto_compact_spec.rb b/spec/ruby/core/gc/auto_compact_spec.rb
index 96e7d3923c6..386725996d9 100644
--- a/spec/ruby/core/gc/auto_compact_spec.rb
+++ b/spec/ruby/core/gc/auto_compact_spec.rb
@@ -3,14 +3,15 @@ require_relative '../../spec_helper' https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/gc/auto_compact_spec.rb#L3
 ruby_version_is "3.0" do
   describe "GC.auto_compact" do
     it "can set and get a boolean value" do
-      original = GC.auto_compact
       begin
-        GC.auto_compact = !original
+        GC.auto_compact = GC.auto_compact
       rescue NotImplementedError # platform does not support autocompact
         skip
       end
 
+      original = GC.auto_compact
       begin
+        GC.auto_compact = !original
         GC.auto_compact.should == !original
       ensure
         GC.auto_compact = original
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]