This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# | |
# Stringクラスにxor(^)を追加してみるテスト。主にCTF用? | |
# | |
class String | |
def ^(str) | |
sho = self | |
lon = str | |
sho, lon = lon, sho if sho.size > lon.size |