Skip to content

Instantly share code, notes, and snippets.

@Burgestrand
Created October 29, 2020 10:22
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 Burgestrand/74dcf64fab7a8703f9445b4d0eaf5dea to your computer and use it in GitHub Desktop.
Save Burgestrand/74dcf64fab7a8703f9445b4d0eaf5dea to your computer and use it in GitHub Desktop.
STDIN.set_encoding(Encoding::BINARY)
case STDIN.getc
when "\xC3".b
case STDIN.getc
when "\xA5".b
puts "YAY!"
else
puts "WTF?"
end
else
abort "WAT"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment