rubinius/rubinius — pull request #1549 by leocassarani (2012-02-07 17:08:51+00:00)
Title: Clean up changes introduced in 9e0c903 by removing duplication

Following @jfirebaugh's comments on 9e0c903, this commit adds a version-dependent `Rubinius.convert_to_name` method and uses it to unify the definitions of `Exception#to_yaml_properties`. It also removes the implementation of `Rubinius.convert_to_names` from `kernel/bootstrap/rubinius.rb`, since there seems to be no reason for it to exist.

Unfortunately `Rubinius.convert_to_name` duplicates the knowledge of how method and constant names are represented under 1.8 and 1.9, since `Rubinius.convert_to_names` hasn't been changed to delegate to `convert_to_name`. However I believe this is the right choice, especially if we factor in the performance hit of potentially calling `Rubinius.convert_to_name` thousands of times inside the `map!` block.