Escape result variable name

The variable name is derived from the function name. This name can e.g.
start with a capital letter, which -- before this commit -- made the
variable start with a capital letter too. This made Ruby complain about
dynamic constant assignment.