[ruby/singleton] Only use RactorLocalSingleton if Ractor is defined
https://github.com/ruby/singleton/commit/f684d36a47
This commit is contained in:
parent
a6e96df573
commit
d0c1eef511
@ -196,6 +196,7 @@ module Singleton
|
||||
# Returns the singleton instance.
|
||||
end
|
||||
|
||||
if defined?(Ractor)
|
||||
module RactorLocalSingleton
|
||||
include Singleton::SingletonInstanceMethods
|
||||
|
||||
@ -236,3 +237,4 @@ module RactorLocalSingleton
|
||||
|
||||
extend Singleton::SingletonClassProperties
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user