タグ

ブックマーク / avdi.codes (1)

  • Using "and" and "or" in Ruby

    UPDATE: For a newer, better take on this topic, check out this post. UPDATE 2: This topic is part of the Graceful.Dev Flawless Ruby course, which is now completely free! If you use Ruby long enough, you will discover the and and or operators. These appear at first glance to be synonyms for && and ||. You will then be tempted to use these English oprators in place of && and ||, for the sake of impr

    Using "and" and "or" in Ruby
    zorio
    zorio 2010/08/03
    Rubyの&&と||はブール演算子、andとorは処理のフローを制御するのに使う。それがandとorの優先順位が低い理由。
  • 1