Ok, I am unfamiliar with the semantics of Ruby, is the fix is this PR sufficient?
https://github.com/gitlabhq/gitlabhq/pull/4670
And I can see how this is not the favorable in this case, but can you explain why you say it is "VERY BAD" in general.
http://therubyway.org/a-ruby-idiom-defining-methods-based-on-conditions-at-runtime/
Also, so are hard coded paths in a web application.