We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 93bc2a2 + e75ba39 commit 24d6f38Copy full SHA for 24d6f38
lib/raven/okjson.rb
@@ -272,7 +272,7 @@ def numtok(s)
272
elsif m[2]
273
[:val, m[0], Float(m[0])]
274
else
275
- [:val, m[0], Integer(m[1])*(10**Integer(m[3][1..-1]))]
+ [:val, m[0], Integer(m[1])*(10**m[3][1..-1].to_i(10))]
276
end
277
278
[]
spec/raven/okjson_spec.rb
@@ -20,4 +20,8 @@
20
21
22
23
+ it 'parses zero-leading exponent numbers correctly' do
24
+ expect(Raven::OkJson.decode("[123e090]")).to eq [123000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000]
25
+ end
26
+
27
0 commit comments