summaryrefslogtreecommitdiffstats
path: root/lib/yaml.rb
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-18 01:06:00 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-18 01:06:00 +0000
commit811bf249cc2854cbb9e6ae3d90080fb67867e9f4 (patch)
treeb1ac96e38ef670c683e12092084de165d11fe080 /lib/yaml.rb
parent1a2900e232d02462aeb51e1aa10a6e7731c07a27 (diff)
downloadruby-811bf249cc2854cbb9e6ae3d90080fb67867e9f4.tar.gz
ruby-811bf249cc2854cbb9e6ae3d90080fb67867e9f4.tar.xz
ruby-811bf249cc2854cbb9e6ae3d90080fb67867e9f4.zip
* ext/syck/rubyext.c (rb_syck_load_handler): merge key implemented.
* ext/syck/rubyext.c (transfer_find_i): removed use of String#=~ in favor of Regexp#match. * lib/yaml.rb: YAML::try_implicit returns. * lib/yaml/rubytypes.rb: Regexps added for type matching. * lib/yaml/emitter.rb: fix String + nil error. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml.rb')
-rw-r--r--lib/yaml.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/yaml.rb b/lib/yaml.rb
index 4bafa7c5d..39e176541 100644
--- a/lib/yaml.rb
+++ b/lib/yaml.rb
@@ -118,6 +118,13 @@ module YAML
@@loader.transfer( type_id, obj )
end
+ #
+ # Apply any implicit a node may qualify for
+ #
+ def YAML.try_implicit( obj )
+ YAML.transfer( YAML.detect_implicit( obj ), obj )
+ end
+
#
# Method to extract colon-seperated type and class, returning
# the type and the constant of the class