Return XPath integers as actual integers.

This is to ensure that calls such as string(10) return "10" and not "10.0". It
also saves integer -> float conversions when they're not needed.
This commit is contained in:
Yorick Peterse committed 2014-08-23 20:22:58 +02:00
1 parent b316fd3e1c
commit 431a253000
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -794,7 +794,7 @@ module Oga
# @return [Float]
#
def on_int(ast_node, context)
return ast_node.children[0].to_f
return ast_node.children[0]
end
##