summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-11-17 22:08:16 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2009-11-17 22:08:16 -0800
commitf024c26770bd7e79902cae79396b3b65fc1f7597 (patch)
treea0b89d41fc86b52d84370be2e7fd1ac094cf6ba3
parent3a2e7c38729bb450325102ab31746732d884d11b (diff)
downloadpsych-f024c26770bd7e79902cae79396b3b65fc1f7597.zip
fixing more tests. yay
-rw-r--r--lib/psych/visitors/to_ruby.rb2
-rw-r--r--test/yaml/test_yaml.rb5
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/psych/visitors/to_ruby.rb b/lib/psych/visitors/to_ruby.rb
index 826705c..c9d5bad 100644
--- a/lib/psych/visitors/to_ruby.rb
+++ b/lib/psych/visitors/to_ruby.rb
@@ -15,7 +15,7 @@ module Psych
return result if Psych.domain_types.empty?
if target.respond_to?(:tag) && target.tag
- short_name = target.tag.split('/', 2).last
+ short_name = target.tag.sub(/^!/, '').split('/', 2).last
if Psych.domain_types.key? short_name
url, block = Psych.domain_types[short_name]
return block.call "http://#{url}:#{short_name}", result
diff --git a/test/yaml/test_yaml.rb b/test/yaml/test_yaml.rb
index 15b8ca3..52d700d 100644
--- a/test/yaml/test_yaml.rb
+++ b/test/yaml/test_yaml.rb
@@ -914,6 +914,7 @@ EOY
)
end
+ # MODIFIED for YAML compliance
def test_spec_builtin_literal_blocks
# Assortment of literal scalar blocks
assert_parse_only(
@@ -921,7 +922,7 @@ EOY
empty: |
literal: |
- The \\ ' " characters may be
+ The \\\ ' " characters may be
freely used. Leading white
space is significant.
@@ -931,7 +932,7 @@ literal: |
single line break, but does
not start with one.
-is equal to: "The \\ ' \\" characters may \\
+is equal to: "The \\\\ ' \\" characters may \\
be\\nfreely used. Leading white\\n space \\
is significant.\\n\\nLine breaks are \\
significant.\\nThus this value contains \\