Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1747

Show
Ignore:
Timestamp:
10/28/06 21:20:37 (2 years ago)
Author:
nahi
Message:

added a workaround for rubygems' custom require inconsistency.
closes #277.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/xsd/xmlparser.rb

    r1558 r1747  
    5252  begin 
    5353    require lib 
     54    # XXX: for a workaround of rubygems' require inconsistency 
     55    # XXX: MUST BE REMOVED IN THE FUTURE 
     56    name = lib.sub(/^.*\//, '') 
     57    raise LoadError unless XSD::XMLParser.constants.find { |c| 
     58      c.downcase == name 
     59    } 
    5460    loaded = true 
    5561    break 
  • trunk/lib/xsd/xmlparser/parser.rb

    r1520 r1747  
    2323  class UnexpectedElementError < FormatDecodeError; end 
    2424  class ElementConstraintError < FormatDecodeError; end 
     25  class ParserError < ParseError; end 
    2526 
    2627  @@parser_factory = nil 
     
    3132 
    3233  def self.create_parser(host, opt = {}) 
     34    unless @@parser_factory 
     35      raise ParserError.new("illegal XML parser configuration") 
     36    end 
    3337    @@parser_factory.new(host, opt) 
    3438  end 
     
    6064 
    6165  def do_parse(string_or_readable) 
    62     raise NotImplementError.new( 
     66    raise ParserError.new( 
    6367      'Method do_parse must be defined in derived class.') 
    6468  end