Skip to content

Instantly share code, notes, and snippets.

@epidemian
Created March 31, 2014 04:10
Show Gist options
  • Save epidemian/9885093 to your computer and use it in GitHub Desktop.
Save epidemian/9885093 to your computer and use it in GitHub Desktop.
$F.map(&:size).max.times{|i|puts$F.map{|s|s[i]||' '}.join' '}
@epidemian
Copy link
Author

Sample run

$ ruby -na vertical-words.rb <<<'This sentence is false'
T s i f
h e s a
i n   l
s t   s
  e   e
  n    
  c    
  e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment