diff --git a/lib/i18n/tasks/concurrent/cached_value.rb b/lib/i18n/tasks/concurrent/cached_value.rb index a9e93ec1..bafe65bc 100644 --- a/lib/i18n/tasks/concurrent/cached_value.rb +++ b/lib/i18n/tasks/concurrent/cached_value.rb @@ -13,6 +13,11 @@ class CachedValue def initialize(&computation) @computation = computation @mutex = Mutex.new + + # Ruby instance variables are currently implicitly "volatile" in all major implementations, see: + # https://bugs.ruby-lang.org/issues/11539 + # + # If the Ruby specification changes, this variable must be marked "volatile". @result = NULL end