Skip to content

Commit

Permalink
refs #8952, libxml version fix
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantin committed Jan 18, 2011
1 parent 9001e3a commit f363b8d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/awsbase/right_awsbase.rb
Expand Up @@ -980,7 +980,7 @@ def on_end_element(name)
end
end

class RightSaxParserCallback14 < RightSaxParserCallbackTemplate
class RightSaxParserCallbackNs < RightSaxParserCallbackTemplate
def on_start_element_ns(name, attr_hash, prefix, uri, namespaces)
@right_aws_parser.tag_start(name, attr_hash)
end
Expand Down Expand Up @@ -1050,8 +1050,8 @@ def parse(xml_text, params={})
begin
require 'xml/libxml'
# is it new ? - Setup SaxParserCallback
if XML::Parser::VERSION >= '1.4'
RightSaxParserCallback14.include_callback
if XML::Parser::VERSION >= '0.9.7'
RightSaxParserCallbackNs.include_callback
elsif XML::Parser::VERSION >= '0.5.1.0'
RightSaxParserCallback.include_callback
end
Expand All @@ -1076,8 +1076,8 @@ def parse(xml_text, params={})
xml.string = xml_text
end
# check libxml-ruby version
if XML::Parser::VERSION >= '1.4'
xml.callbacks = RightSaxParserCallback14.new(self)
if XML::Parser::VERSION >= '0.9.7'
xml.callbacks = RightSaxParserCallbackNs.new(self)
elsif XML::Parser::VERSION >= '0.5.1.0'
xml.callbacks = RightSaxParserCallback.new(self)
else
Expand Down

0 comments on commit f363b8d

Please sign in to comment.