diff options
author | Yuki Nishijima <yk.nishijima@gmail.com> | 2021-12-23 10:48:21 +0900 |
---|---|---|
committer | Yuki Nishijima <yk.nishijima@gmail.com> | 2021-12-23 10:48:27 +0900 |
commit | 1527f7569b0412f3bc7ac98a3461e59a4891ed96 (patch) | |
tree | b7b74e3557a02475ca38179debe7ac8442f357b7 /test/optparse | |
parent | 1f94ae019fa16aefe56f9a8fde9d1a2af08f351e (diff) | |
download | ruby-1527f7569b0412f3bc7ac98a3461e59a4891ed96.tar.gz |
Revert "Replace an deprecated constant with a new one in did_you_mean"
This reverts commit 573d9d3a4a0f112379874cedf4e494515e4b3f15.
Diffstat (limited to 'test/optparse')
-rw-r--r-- | test/optparse/test_did_you_mean.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/optparse/test_did_you_mean.rb b/test/optparse/test_did_you_mean.rb index a9ad051f03..aa866f4072 100644 --- a/test/optparse/test_did_you_mean.rb +++ b/test/optparse/test_did_you_mean.rb @@ -13,7 +13,11 @@ class TestOptionParser::DidYouMean < TestOptionParser @opt.def_option("--bar", Integer) { |v| @bar = v } @opt.def_option("--baz", Integer) { |v| @baz = v } @formatter = ::DidYouMean.formatter - ::DidYouMean.formatter = ::DidYouMean::Formatter + case @formatter + when ::DidYouMean::PlainFormatter + else + ::DidYouMean.formatter = ::DidYouMean::PlainFormatter.new + end end def teardown |