Skip to content

Instantly share code, notes, and snippets.

@ddlion
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddlion/a603155c93b7e8f36611 to your computer and use it in GitHub Desktop.
Save ddlion/a603155c93b7e8f36611 to your computer and use it in GitHub Desktop.
class Fixnum
def fizz_buzz
puts 'fizzbuzz' if self % 15 == 0
puts 'fizz' if self % 5 == 0
puts 'buzz' if self % 3 == 0
puts self
end
end
require './fizz_buzz'
100.times {|i| (i+1).fizz_buzz}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment