Skip to content

Instantly share code, notes, and snippets.

@fujimura
Forked from udzura/q01.rb
Created July 30, 2012 01:26
Show Gist options
  • Save fujimura/3203169 to your computer and use it in GitHub Desktop.
Save fujimura/3203169 to your computer and use it in GitHub Desktop.
Question
def leap_year?(year)
if !year.is_a?(Integer)
return false
end
if year % 4 == 0
if year % 100 == 0
if year % 400 == 0
return true
else
return false
end
else
return true
end
else
return false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment