diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-10-27 11:25:58 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-10-27 11:29:20 +0900 |
commit | 4c32fcb84f19a3821c25f7a01ac995af3826d83e (patch) | |
tree | 164a564543235807c9d291b4150c94d2ef1c2e71 /test/error_highlight/test_error_highlight.rb | |
parent | 33844f3096ed15eb1568d6aa333d8040ec9f074a (diff) | |
download | ruby-4c32fcb84f19a3821c25f7a01ac995af3826d83e.tar.gz |
[ruby/error_highlight] Make the formatter mechanism support Ractor
Now the formatter configuration is per Ractor. DefaultFormatter is used
if not set.
DefaultFormatter#message_for is now a class method to allow sub-Ractors
to call the method.
https://github.com/ruby/error_highlight/commit/9fbaa8ab7c
Diffstat (limited to 'test/error_highlight/test_error_highlight.rb')
-rw-r--r-- | test/error_highlight/test_error_highlight.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/error_highlight/test_error_highlight.rb b/test/error_highlight/test_error_highlight.rb index 9fc14202b5..08036bca54 100644 --- a/test/error_highlight/test_error_highlight.rb +++ b/test/error_highlight/test_error_highlight.rb @@ -5,7 +5,7 @@ require "tempfile" class ErrorHighlightTest < Test::Unit::TestCase class DummyFormatter - def message_for(corrections) + def self.message_for(corrections) "" end end @@ -13,7 +13,7 @@ class ErrorHighlightTest < Test::Unit::TestCase def setup if defined?(DidYouMean) @did_you_mean_old_formatter = DidYouMean.formatter - DidYouMean.formatter = DummyFormatter.new + DidYouMean.formatter = DummyFormatter end end |