aboutsummaryrefslogtreecommitdiffstats
path: root/ext/syck
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-19 04:54:06 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-19 04:54:06 +0000
commit8ef7bb8c211d156b33f1f97f7c500e5b465fdf5b (patch)
tree2bd2a2d35da8c7fc0f67e7b1a8d633a3ff8b2a54 /ext/syck
parent87d8a3b9ce775529f8fee6d39061cd958092bf1e (diff)
downloadruby-8ef7bb8c211d156b33f1f97f7c500e5b465fdf5b.tar.gz
* ext/syck/lib/syck.rb: fixing unused variable warnings
* ext/syck/lib/syck/basenode.rb: ditto * ext/syck/lib/syck/rubytypes.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/lib/syck.rb12
-rw-r--r--ext/syck/lib/syck/basenode.rb1
-rw-r--r--ext/syck/lib/syck/rubytypes.rb2
3 files changed, 7 insertions, 8 deletions
diff --git a/ext/syck/lib/syck.rb b/ext/syck/lib/syck.rb
index 92fd7a15d6..f8e3c0f8bc 100644
--- a/ext/syck/lib/syck.rb
+++ b/ext/syck/lib/syck.rb
@@ -132,7 +132,7 @@ module Syck
# #=> :locked
#
def self.load( io )
- yp = parser.load( io )
+ parser.load( io )
end
#
@@ -175,7 +175,7 @@ module Syck
# @value=":locked", @kind=:scalar>
#
def self.parse( io )
- yp = generic_parser.load( io )
+ generic_parser.load( io )
end
#
@@ -217,7 +217,7 @@ module Syck
#
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 @@ module Syck
# 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 @@ module Syck
#
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 @@ module Syck
#
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
diff --git a/ext/syck/lib/syck/basenode.rb b/ext/syck/lib/syck/basenode.rb
index 3739331562..5dc27bfdfe 100644
--- a/ext/syck/lib/syck/basenode.rb
+++ b/ext/syck/lib/syck/basenode.rb
@@ -83,7 +83,6 @@ module Syck
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 )
diff --git a/ext/syck/lib/syck/rubytypes.rb b/ext/syck/lib/syck/rubytypes.rb
index 6b2937bba0..50a6f4622b 100644
--- a/ext/syck/lib/syck/rubytypes.rb
+++ b/ext/syck/lib/syck/rubytypes.rb
@@ -61,7 +61,7 @@ class Struct
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