2013å¹´02æ24æ¥22:30 ã«ãã´ãªNewsLightweight Languages news - Run Ruby 2.0 from Your Browser Now! ã³ã¼ãã®æªæ¥ ã¾ã¤ãã¨ããã²ã 20æ³ã®èªçæ¥&&ãã¼ã¸ã§ã³2.0ããã§ã¨ãããã¾ãã Ruby 2.0.0-p0 ãªãªã¼ã¹ æ©éllevalã§ã対å¿ãã¾ããã fizzbuzz = Enumerator.new { |yielder| 1.upto(Float::INFINITY) do |n| case when n % 15 == 0 then yielder << "FizzBuzz" when n % 5 == 0 then yielder << "Buzz" when n % 3 == 0 then yielder << "Fizz" else yielder << n.to_s end end }
{{#tags}}- {{label}}
{{/tags}}