ruby-changes:69525
From: Benoit <ko1@a...>
Date: Sat, 30 Oct 2021 04:55:26 +0900 (JST)
Subject: [ruby-changes:69525] 800dad6297 (master): Skip GC.auto_compact= spec for platforms not supporting it
https://git.ruby-lang.org/ruby.git/commit/?id=800dad6297 From 800dad62970989c0afeb26f1780c53683335a8d9 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Fri, 29 Oct 2021 21:54:17 +0200 Subject: Skip GC.auto_compact= spec for platforms not supporting it * See https://github.com/ruby/spec/pull/891 --- spec/ruby/core/gc/auto_compact_spec.rb | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/spec/ruby/core/gc/auto_compact_spec.rb b/spec/ruby/core/gc/auto_compact_spec.rb index d77ed444521..96e7d3923c6 100644 --- a/spec/ruby/core/gc/auto_compact_spec.rb +++ b/spec/ruby/core/gc/auto_compact_spec.rb @@ -2,18 +2,19 @@ require_relative '../../spec_helper' https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/gc/auto_compact_spec.rb#L2 ruby_version_is "3.0" do describe "GC.auto_compact" do - before :each do - @default = GC.auto_compact - end - - after :each do - GC.auto_compact = @default - end - it "can set and get a boolean value" do original = GC.auto_compact - GC.auto_compact = !original - GC.auto_compact.should == !original + begin + GC.auto_compact = !original + rescue NotImplementedError # platform does not support autocompact + skip + end + + begin + GC.auto_compact.should == !original + ensure + GC.auto_compact = original + end end end end -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/