Defect #13692
closedwarning: already initialized constant on Ruby 1.8.7
Description
When running the following command (either from the command line or git's post-receive hook) output generated produces warnings.
Commandrails runner "Repository.fetch_changesets" -e production
Warnings/usr/lib64/ruby/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:19: warning: already initialized constant UnknownFileType
/usr/lib64/ruby/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:126: warning: already initialized constant TypeFromExt
/usr/lib64/ruby/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:132: warning: already initialized constant TypeFromShebang
/usr/lib64/ruby/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:138: warning: already initialized constant TypeFromName
We're running redmine via passenger, and almost exclusively calling this script from gits post-receive hook. No functionality is broken, it's just generating warning output in the developers git bash when they push and trigger the script, which is causing a little bit of panic.
We upgraded directly from 2.1.6 so I do not know if this affected 2.2.x