Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated syck to 1.9.3p0.

  • Loading branch information...
commit 56f38c1c49cd4f3b9e4ab743ccf84d9123d6fce4 1 parent 783eb0b
@brixen brixen authored
View
14 lib/19/syck.rb
@@ -1,5 +1,5 @@
# -*- mode: ruby; ruby-indent-level: 4; tab-width: 4 -*- vim: sw=4 ts=4
-# $Id: syck.rb 27334 2010-04-14 02:37:54Z nobu $
+# $Id: syck.rb 28681 2010-07-19 04:54:06Z tenderlove $
#
# = yaml.rb: top-level module with methods for loading and parsing YAML documents
#
@@ -132,7 +132,7 @@ def self.dump( obj, io = nil )
# #=> :locked
#
def self.load( io )
- yp = parser.load( io )
+ parser.load( io )
end
#
@@ -175,7 +175,7 @@ def self.load_file( filepath )
# @value=":locked", @kind=:scalar>
#
def self.parse( io )
- yp = generic_parser.load( io )
+ generic_parser.load( io )
end
#
@@ -217,7 +217,7 @@ def self.parse_file( filepath )
#
def self.each_document( io, &block )
warn "#{caller[0]}: YAML.each_document is deprecated" if $VERBOSE && !caller[0].start_with?(File.dirname(__FILE__))
- yp = parser.load_documents( io, &block )
+ parser.load_documents( io, &block )
end
#
@@ -232,7 +232,7 @@ def self.each_document( io, &block )
# end
#
def self.load_documents( io, &doc_proc )
- yp = parser.load_documents( io, &doc_proc )
+ parser.load_documents( io, &doc_proc )
end
#
@@ -248,7 +248,7 @@ def self.load_documents( io, &doc_proc )
#
def self.each_node( io, &doc_proc )
warn "#{caller[0]}: YAML.each_node is deprecated" if $VERBOSE && !caller[0].start_with?(File.dirname(__FILE__))
- yp = generic_parser.load_documents( io, &doc_proc )
+ generic_parser.load_documents( io, &doc_proc )
end
#
@@ -366,7 +366,7 @@ def self.try_implicit( obj )
#
def self.read_type_class( type, obj_class )
warn "#{caller[0]}: YAML.read_type_class is deprecated" if $VERBOSE && !caller[0].start_with?(File.dirname(__FILE__))
- scheme, domain, type, tclass = type.split( ':', 4 )
+ type, tclass = type.split( ':', 4 ).last(2)
tclass.split( "::" ).each { |c| obj_class = obj_class.const_get( c ) } if tclass
return [ type, obj_class ]
end
View
1  lib/19/syck/basenode.rb
@@ -83,7 +83,6 @@ def at( seg )
def match_path( ypath_str )
warn "#{caller[0]}: match_path is deprecated" if $VERBOSE
require 'syck/ypath'
- depth = 0
matches = []
YPath.each_path( ypath_str ) do |ypath|
seg = match_segment( ypath, 0 )
View
5 lib/19/syck/rubytypes.rb
@@ -10,6 +10,7 @@ def to_yaml( opts = {} )
class Object
yaml_as "tag:ruby.yaml.org,2002:object"
def to_yaml_style; end
+ undef to_yaml_properties rescue nil
def to_yaml_properties; instance_variables.sort; end
def to_yaml( opts = {} )
YAML::quick_emit( self, opts ) do |out|
@@ -61,7 +62,7 @@ def self.yaml_new( klass, tag, val )
props = {}
val.delete_if { |k,v| props[k] = v if k =~ /^@/ }
begin
- struct_name, struct_type = YAML.read_type_class( tag, Struct )
+ struct_type = YAML.read_type_class( tag, Struct ).last
rescue NameError
end
if not struct_type
@@ -271,7 +272,7 @@ def Regexp.yaml_new( klass, tag, val )
mods |= Regexp::EXTENDED if val['mods'].include?( 'x' )
mods |= Regexp::IGNORECASE if val['mods'].include?( 'i' )
mods |= Regexp::MULTILINE if val['mods'].include?( 'm' )
- mods |= 32 if val['mods'].include?( 'n' )
+ mods |= Regexp::NOENCODING if val['mods'].include?( 'n' )
end
val.delete( 'mods' )
r = YAML::object_maker( klass, {} )
Please sign in to comment.
Something went wrong with that request. Please try again.