lol I just figured out one way to make your ls command into an array.
in a single line.

x = `ls`.split

or

x = `echo *`.split

on more info on the shell and what it can take look at the man page `man sh`

http://www.freebsd.org/cgi/man.cgi?query=sh

~happy hacking =)