summaryrefslogtreecommitdiff
path: root/lib/xsd/qname.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xsd/qname.rb')
-rw-r--r--lib/xsd/qname.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/xsd/qname.rb b/lib/xsd/qname.rb
index 18b002764b..bb9763a69a 100644
--- a/lib/xsd/qname.rb
+++ b/lib/xsd/qname.rb
@@ -31,9 +31,6 @@ class QName
end
def match(rhs)
- unless self.class === rhs
- return false
- end
if rhs.namespace and (rhs.namespace != @namespace)
return false
end
@@ -44,7 +41,7 @@ class QName
end
def ==(rhs)
- (self.class === rhs && @namespace == rhs.namespace && @name == rhs.name)
+ !rhs.nil? and @namespace == rhs.namespace and @name == rhs.name
end
def ===(rhs)
@@ -73,6 +70,8 @@ class QName
NormalizedNameRegexp =~ str
self.new($1, $2)
end
+
+ EMPTY = QName.new.freeze
end