Hi,

  require 'pathname'
  require 'fileutils'
  
  source = Pathname.new("/tmp/abc.txt")
  target = Pathname.new("/tmp/def.txt")

  FileUtils.cp(source, target)    # This line errors.

Produces error:

/usr/local/lib/ruby/1.8/fileutils.rb:718:in `fu_each_src_dest': undefined method `[]' for #<Pathname
:/home/gavin/Projects/stdlib-doc/html> (NoMethodError)
        from /usr/local/lib/ruby/1.8/fileutils.rb:314:in `cp'


It works if source and target receive to_str before the method is
called.

It would be nice for these libraries to work together nicely.

Gavin