Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
An insane, one-line solution to FizzBuzz in Ruby, using no conditionals.
def fizzbuzz(start, limit) loop do puts "#{'fizz' * (((start % 3 / (start % 3 + 1.0)).ceil - 1) * (-1))}#{'buzz' * (((start % 5 / (start % 5 + 1.0)).ceil - 1) * (-1))}#{start.to_s * ((start % 3 / (start % 3 + 1.0)).ceil * ((start % 5) / ((((start += ((limit + 1) - start)/((limit + 1) - start)) - 1) % 5) + 1.0)).ceil)}" end end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment