Fix serializing BigInteger and Decimal#2061
Fix serializing BigInteger and Decimal#2061AArnott merged 7 commits intoMessagePack-CSharp:developfrom
Conversation
|
Interesting that this bug has been around for a long time, and just last week I found and fixed it over in Nerdbank.MessagePack. Your fix isn't quite right either. I'm preparing a change to finish the fix. |
AArnott
left a comment
There was a problem hiding this comment.
Thanks for contributing. Just a question about the test.
| var x = ParallelEnumerable | ||
| .Range(start, end) | ||
| .Aggregate( | ||
| () => System.Numerics.BigInteger.One, | ||
| (localProduct, i) => localProduct * i, | ||
| (totalProduct, localProduct) => totalProduct * localProduct, | ||
| finalProduct => finalProduct); |
There was a problem hiding this comment.
Can we avoid factorial computation for our test, as that's irrelevant, and instead just initialize a very large number? Maybe using Math.Pow(300,300) or something like that?
There was a problem hiding this comment.
Yes, I just committed a simpler test case.
|
Oh, and in fact I fixed this bug in this repo last week, in the master branch (#2055) but it just hadn't merged forward to develop yet. |
Fix #2060