Skip to content

Instantly share code, notes, and snippets.

@swarley
Created November 30, 2012 02:56
Show Gist options
  • Select an option

  • Save swarley/4173516 to your computer and use it in GitHub Desktop.

Select an option

Save swarley/4173516 to your computer and use it in GitHub Desktop.
[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