class Bundler::URI::Generic
def self.build2(args)
then it does Bundler::URI::Escape.escape all Bundler::URI components and tries again.
Bundler::URI::Generic::build. But, if exception Bundler::URI::InvalidComponentError is raised,
At first, tries to create a new Bundler::URI::Generic instance using
== Description
See ::new.
== Synopsis
def self.build2(args) begin return self.build(args) rescue InvalidComponentError if args.kind_of?(Array) return self.build(args.collect{|x| if x.is_a?(String) DEFAULT_PARSER.escape(x) else x end }) elsif args.kind_of?(Hash) tmp = {} args.each do |key, value| tmp[key] = if value DEFAULT_PARSER.escape(value) else value end end return self.build(tmp) end end end