Conversation
単純にRubyのバージョンだけの変更ではうまくいかなかったので差分が比較的多いです。 まずRubyのバージョンを上げてテストを実行したところ、次のようなエラーになりました ``` /Users/willnet/.rbenv/versions/3.4.3/lib/ruby/gems/3.4.0/gems/minitest-5.16.3/lib/minitest.rb:3:in 'Kernel#require': cannot load such file -- mutex_m (LoadError) ``` minitestが依存していた[mutex_m](https://github.com/ruby/mutex_m)がbundled gemになった結果このエラーになったと判断し、bundle updateでminitestのバージョンを上げました。 すると今度は次のようなエラーになりました。 ``` /Users/willnet/ghq/github.com/kinoppyd/reading-metaprogramming-ruby/00_setup/test/test_try_out.rb:4:in '<top (required)>': uninitialized constant MiniTest (NameError) class TestTryOut < MiniTest::Test ``` これは、"MiniTest"という古い参照の仕方が[+ Only load minitest/unit (aka ancient MiniTest compatibility layer) … · minitest/minitest@a2c6c18](https://github.com/minitest/minitest/commit/a2c6c18570f6f0a1bf6af70fe3b6d9599a13fdd6)で消されたのが原因のようです。一括置換で"Minitest"に変更して対応しました。 これでテストが通るようになったので大丈夫なはず。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

単純にRubyのバージョンだけの変更ではうまくいかなかったので差分が比較的多いです。
まずRubyのバージョンを上げてテストを実行したところ、次のようなエラーになりました
minitestが依存していたmutex_mがbundled gemになった結果このエラーになったと判断し、bundle updateでminitestのバージョンを上げました。
すると今度は次のようなエラーになりました。
これは、"MiniTest"という古い参照の仕方が+ Only load minitest/unit (aka ancient MiniTest compatibility layer) … · minitest/minitest@a2c6c18で消されたのが原因のようです。一括置換で"Minitest"に変更して対応しました。
これでテストが通るようになったので大丈夫なはず。