diff --git a/src/crystal/system/unix/pthread.cr b/src/crystal/system/unix/pthread.cr index 73aa2a652ca1..98629a70fbb6 100644 --- a/src/crystal/system/unix/pthread.cr +++ b/src/crystal/system/unix/pthread.cr @@ -269,16 +269,16 @@ module Crystal::System::Thread {% end %} def self.sig_suspend : ::Signal - if GC.responds_to?(:sig_suspend) - GC.sig_suspend + if (gc = GC).responds_to?(:sig_suspend) + gc.sig_suspend else ::Signal.new(SIG_SUSPEND) end end def self.sig_resume : ::Signal - if GC.responds_to?(:sig_resume) - GC.sig_resume + if (gc = GC).responds_to?(:sig_resume) + gc.sig_resume else ::Signal.new(SIG_RESUME) end