summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/src/json/ext/Parser.rl4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/json/ext/Parser.rl b/java/src/json/ext/Parser.rl
index b850b71..02056f8 100644
--- a/java/src/json/ext/Parser.rl
+++ b/java/src/json/ext/Parser.rl
@@ -505,7 +505,9 @@ public class Parser extends RubyObject {
}
ByteList num = absSubSequence(memo, p);
- RubyInteger number = ConvertBytes.byteListToInum(getRuntime(), num, 10, true);
+ RubyInteger number = getRuntime().is1_9() ?
+ ConvertBytes.byteListToInum19(getRuntime(), num, 10, true) :
+ ConvertBytes.byteListToInum(getRuntime(), num, 10, true);
return new ParserResult(number, p + 1);
}