Skip to content

Instantly share code, notes, and snippets.

@rrreeeyyy
Last active December 13, 2015 19:48
Show Gist options
  • Save rrreeeyyy/4965395 to your computer and use it in GitHub Desktop.
Save rrreeeyyy/4965395 to your computer and use it in GitHub Desktop.
文字列a, bが回転であるか判定
def rotate?(a, b)
a.length == b.length && (a * 2).include?(b)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment