不能放进去,放进去就报 warning
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/FileUtils.rb:93: warning: already initialized constant FileUtils::OPT_TABLE
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/fileutils.rb:93: warning: previous definition of OPT_TABLE was here
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/FileUtils.rb:1293: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/fileutils.rb:1293: warning: previous definition of S_IF_DOOR was here
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/FileUtils.rb:1556: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/fileutils.rb:1556: warning: previous definition of DIRECTORY_TERM was here
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/FileUtils.rb:1558: warning: already initialized constant FileUtils::Entry_::SYSCASE
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/fileutils.rb:1558: warning: previous definition of SYSCASE was here
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/FileUtils.rb:1677: warning: already initialized constant FileUtils::LOW_METHODS
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/fileutils.rb:1677: warning: previous definition of LOW_METHODS was here
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/FileUtils.rb:1683: warning: already initialized constant FileUtils::METHODS
/Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/fileutils.rb:1683: warning: previous definition of METHODS was here
ruby -Ilib bin/tocmd -d .
必须写 require 'FileUtils',不然就报错
bin/tocmd:55:in `block in <main>': uninitialized constant FileUtils (NameError)
from /Users/sang/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/optparse.rb:880:in `initialize'
from bin/tocmd:22:in `new'
from bin/tocmd:22:in `<main>'
see at http://amaras-tech.co.uk/article/123/warning%3A_already_initialized_constant
但是它没有解决这个问题
已接近,感谢 @zhangyuan