Most of configuration files in ruby such as Gemfile, gemspec, are just ruby code itself. Why database configuration file in rails is the exception?
Personal theory is ruby code is scary to administrators, and the one configuration file they would often have to mess with is the database configuration. YAML is a bit more approachable.
One bonus is that other languages can read YAML, while you can't read a ruby config file in Python (easily).
That said I'd use ruby for complex config setups
For configuration of a common module across environments it is the most concise way of doing so. To do it in Ruby adds more complexity to the file.
You would have to ask the original designer though to get the real answer.