Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created August 11, 2022 22:50
Show Gist options
  • Save havenwood/8c928c8a4ffcbe5639b89fac4d922217 to your computer and use it in GitHub Desktop.
Save havenwood/8c928c8a4ffcbe5639b89fac4d922217 to your computer and use it in GitHub Desktop.
#ruby irc
ai = a.invert
bi = b.invert
dup_keys = ai.keys & bi.keys
ai.slice(*dup_keys).merge(bi.slice(*dup_keys)) { [_2, _3] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment