I’m having a little trouble understanding something. Save the following
script in an empty directory and run it:
Dir.new(".").to_a.each do |x|
You should get output that looks something like this:
I was expecting x to be a one-character string.
- Why isn’t x a one-character string?
- How do I determine what the first character of such a string is? I’m
guessing this isn’t the proper way, but I’d like to understand why it