Created
December 26, 2011 15:25
-
-
Save nouse/1521393 to your computer and use it in GitHub Desktop.
yaml tag
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
# results differently in ruby 1.8 and 1.9 | |
require 'yaml' | |
class A; end | |
module B | |
class A | |
yaml_as "tag:ruby.yaml.org,2002:object:A" | |
end | |
end | |
obj = YAML.load("--- !ruby/object:A\n name: fun") | |
p obj.class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment