Skip to content

Instantly share code, notes, and snippets.

@manojnaidu619
Created September 13, 2018 11:07
Show Gist options
  • Save manojnaidu619/26f52b71f6b50ebebde036b2397345e9 to your computer and use it in GitHub Desktop.
Save manojnaidu619/26f52b71f6b50ebebde036b2397345e9 to your computer and use it in GitHub Desktop.
Converts User Input to array
arr = Array.new # New array Object
a = gets
a.each_char{|e| arr.push(e)} # Push each element to array
arr.pop
p arr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment