files.size or file.length in Ruby 1.8.6

On Thu, Dec 23, 2010 at 10:35 AM, Peter Bailey <pbailey / bna.com> wrote:
> Hello,
> Can someone please tell me how to get a count for the number of files in
> a directory?
> Example:
> files = Dir.glob("*.pdf")
> puts files.count ??
>
> That doesn't work, but, I'd love to know what would work.
> Thanks,
> Peter
>
> --
> Posted via http://www.ruby-forum.com/.
>
>