Skip to content

Instantly share code, notes, and snippets.

@vladalive
Last active May 16, 2019 17:00
Show Gist options
  • Save vladalive/137c9d75f2d1e4234c15 to your computer and use it in GitHub Desktop.
Save vladalive/137c9d75f2d1e4234c15 to your computer and use it in GitHub Desktop.
text.gsub(/\w+/){ |w| a = w.split(/^(.)(.*)(.+)$/); a[2] = a[2] && a[2].split(//).shuffle; a.join}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment