ruby-changes:51269
From: usa <ko1@a...>
Date: Mon, 21 May 2018 15:20:32 +0900 (JST)
Subject: [ruby-changes:51269] usa:r63475 (trunk): added `f` for 1 byte FizzBuzz because Hexagony has such feature
usa 2018-05-21 15:20:24 +0900 (Mon, 21 May 2018) New Revision: 63475 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63475 Log: added `f` for 1 byte FizzBuzz because Hexagony has such feature Modified files: trunk/golf_prelude.rb Index: golf_prelude.rb =================================================================== --- golf_prelude.rb (revision 63474) +++ golf_prelude.rb (revision 63475) @@ -50,6 +50,11 @@ class Object https://github.com/ruby/ruby/blob/trunk/golf_prelude.rb#L50 puts "#{a}ello, #{b}orld#{c}" end + def f(m = 100) + 1.upto(m){|n|puts'FizzBuzz +'[i=n**4%-15,i+13]||n} + end + alias say puts def do_while -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/