# File lib/xml/xpath.rb, line 2833 def self.def_comparison_operator(*ops) ops.each { |op| module_eval " def \#{op}(other)\n if other.is_a? XPathBoolean then\n other \#{op} self.to_boolean\n else\n visitor = @visitor\n str = @context.make_string('')\n ret = false\n @nodes.each { |node|\n str.replace visitor.visit(node).string_value\n break if ret = (other \#{op} str)\n }\n ret\n end\n end\n", __FILE__, __LINE__ + 1 } end