Class: URI::Generic

Inherits:
Object
  • Object
show all
Defined in:
lib/xapian/indexer/extensions/uri.rb

Instance Method Summary collapse

Instance Method Details

#merge0(oth) ⇒ Object

This change allows you to merge relative URLs which otherwise isn’t possible.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/xapian/indexer/extensions/uri.rb', line 25

def merge0(oth)
	oth = parser.send(:convert_to_uri, oth)
	
	if self.absolute? && oth.absolute?
		#raise BadURIError,
		#  "both URI are absolute"
		# hmm... should return oth for usability?
		return oth, oth
	end
	
	if self.absolute?
		return self.dup, oth
	else
		return oth, oth
	end
end