case in で例外を発生させる
case when だとマッチしない場合、nilが返るが case in だとNoMatchingPatternError が raise される
https://docs.ruby-lang.org/ja/latest/doc/spec=2fpattern_matching.html