Skip to content

Instantly share code, notes, and snippets.

@bjhess
Created April 23, 2012 14:17
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 bjhess/2471175 to your computer and use it in GitHub Desktop.
Save bjhess/2471175 to your computer and use it in GitHub Desktop.
irb> Array(nil)
=> []
irb> Array("string")
=> ["string"]
irb> Array([:blah, :sah])
=> [:blah, :sah]
irb> "string".to_a
NoMethodError: undefined method `to_a' for "string":String
from (irb):5
from /Users/barry/.rbenv/versions/1.9.3-p125/bin/irb:12:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment