2010-11-02 rubyのswitch文はcaseという ruby case $age when 0 .. 2 "baby" when 3 .. 6 "little child" when 7 .. 12 "child" when 13 .. 18 "youth" else "adult" endネタ元 http://www.ruby-lang.org/ja/man/html/_C0A9B8E6B9BDC2A4.html#case