Created
November 30, 2012 02:56
-
-
Save swarley/4173516 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [5] pry(main)> show-source | |
| From: /usr/local/lib/ruby/1.9.1/psych/core_ext.rb @ line 1: | |
| Number of lines: 18 | |
| class Object | |
| def self.yaml_tag url | |
| Psych.add_tag(url, self) | |
| end | |
| # FIXME: rename this to "to_yaml" when syck is removed | |
| ### | |
| # call-seq: to_yaml(options = {}) | |
| # | |
| # Convert an object to YAML. See Psych.dump for more information on the | |
| # available +options+. | |
| def psych_to_yaml options = {} | |
| Psych.dump self, options | |
| end | |
| remove_method :to_yaml rescue nil | |
| alias :to_yaml :psych_to_yaml | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment