1. è¦ç´ ãåãåºã each ã¡ã½ãã Ruby ã®ãã¤ãã¬ã¼ã¿ãã¯ãè¤æ°ã®è¦ç´ ãæã¤ãªãã¸ã§ã¯ãããåã ã®è¦ç´ ãåãåºããä½ããã®å¦çãé©ç¨ããã¨ãã«ä½¿ãã¨ä¾¿å©ã ä¸çªåºæ¬ã¨ãªãã¡ã½ããã each ãä¾ãã°ãArray ã¯ã©ã¹ã®å ´åãeach ã¡ã½ããã§ãè¦ç´ ãã²ã¨ã¤ã¥ã¥åãåºããã¨ãã§ããã [1,2,3,4,5].each do |i| puts i end ããã¯ã©ãããä»çµã¿ã§ããã®ããã«æ¸ããã®ã ãããï¼ 2. ã¤ãã¬ã¼ã¿ã®å½¹å² ããªãã¸ã§ã¯ãæåã¹ã¯ãªããè¨èª Rubyã(p94) ã§ã¯ãã¤ãã¬ã¼ã¿ã«ã¤ãã¦ã次ã®ããã«è¿°ã¹ããã¦ããã ã¤ãã¬ã¼ã¿ (Iterator) ã¯ã¡ã½ããã®ä¸ç¨®ã§ããã¨ãã¨ã¯ç¹°ãè¿ãã®æ½è±¡åã®ããã®ãã®ã§ããã ããããã¯ãããã ãç¹°ãè¿ãã®æ½è±¡åã®ããã ã¨ããè¦ç¹ã§ãã¤ãã¬ã¼ã¿ãç解ãããã¨ããã¨ãããããããããç¹°ãè¿ãã®å¦çã®ãããã«ãã
{{#tags}}- {{label}}
{{/tags}}