summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2011-12-20 07:00:10 -0600
committerCharles Oliver Nutter <headius@headius.com>2011-12-20 07:00:10 -0600
commit7e72fc62e670f59edc5ca74f339c1bc264214034 (patch)
tree499979c25057cc0afe185de9c930275e6a732e6e
parent48440cb88cc89a162611dda4ed6b3cfc5c80f09e (diff)
downloadjson-7e72fc62e670f59edc5ca74f339c1bc264214034.tar.gz
Use appropriate byteListToInum for Ruby version.
-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);
}