Rich Morin wrote:
> Any idea what I'm doing wrong?  Here's the relevant code:
>   class FileList
> 
>     @@rdoc_src_dir =  ENV['RDOC_SRC_DIR']
> 
>     if (@@rdoc_src_dir)
>       alias :orig_include :include
> 
>       def include(*filenames)
>         list = filenames.map do |name|
>           new_name = "#{@@rdoc_src_dir}/#{name}"
>           puts "new_name='#{new_name}'"             #T
            ^^^^
>         end
>         orig_include(list)
>       end
>       alias :add :include
>     end
>   end
> ...

Puts doesn't return a useful value for +map+ to use.

That being said, I don't see why you don't just duplicate the rails 
doc:app task and replace the filelists with what you need.  It is 
probably less code than what you've invested in hacking FileList#include 
and it will be much less error prone.


-- Jim Weirich

-- 
Posted via http://www.ruby-forum.com/.