You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was not passing some MRI pattern matching specs and realized that it was not setting the NullFormatter. It is because formatter requires Ractors to work.
I did a quick fix:
# Returns the currently set formatter. By default, it is set to +DidYouMean::Formatter+.
def self.formatter
storage = defined?(Ractor) ? Ractor : Thread
storage.current[:__did_you_mean_formatter__] || Formatter
end
# Updates the primary formatter used to format the suggestions.
def self.formatter=(formatter)
storage = defined?(Ractor) ? Ractor : Thread
storage.current[:__did_you_mean_formatter__] = formatter
end
but I suspect this is not right. This is a global setting and not just a thread-specific one...or is it?
The text was updated successfully, but these errors were encountered:
@yuki24 on JRuby. When we try and run C Ruby test suite it disables the did_you_mean formatter. JRuby has no Ractors so it doesn't replace the formatter.
I was not passing some MRI pattern matching specs and realized that it was not setting the NullFormatter. It is because formatter requires Ractors to work.
I did a quick fix:
but I suspect this is not right. This is a global setting and not just a thread-specific one...or is it?
The text was updated successfully, but these errors were encountered: