lib/yard/templates/helpers/markup/rdoc_markup.rb in yard-0.9.24 vs lib/yard/templates/helpers/markup/rdoc_markup.rb in yard-0.9.25

- old
+ new

@@ -32,19 +32,20 @@ end class RDocMarkup attr_accessor :from_path + @@mutex = Mutex.new @@formatter = nil @@markup = nil - @@mutex = nil def initialize(text) @text = text - @@formatter ||= RDocMarkupToHtml.new - @@markup ||= MARKUP.new - @@mutex ||= Mutex.new + @@mutex.synchronize do + @@formatter ||= RDocMarkupToHtml.new + @@markup ||= MARKUP.new + end end def to_html html = nil @@mutex.synchronize do