Adam Block <adam / usa.net> writes:

> The problem is that the YAML structure is loaded as strings, so if I 
> specify STDOUT I get a log file named "STDOUT". Is there an elegant way 
> around this problem? I see two less-elegant ways:

[snip]

> I know casting is bad. Any suggestions appreciated. Thanks!

Module#const_get might help you out:

  require 'logger'
  output = "STDOUT"
  output = Kernel.const_get(output) rescue output
  log = Logger.new(output)
  log.instance_variable_get("@logdev").dev == STDOUT # => true

- Marshall