Actions
Bug #19390
closedTime.new: Assertion Failed: bignum.c:4187:rb_int_parse_cstr:len != 0
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.2.0 (2023-01-25 revision a22eca8231), ruby 3.3.0dev (2023-01-30T08:29:31Z master 1c7bf378a1)
Description
Can be reproduced with the following snippet:
Time.new("2020-10-28T16:48:07.000Z")
I suspect but haven't confirmed that this bug was introduced in the fix for [Bug #19296]
cc @nobu (Nobuyoshi Nakada)
I have a patch for it, I'll open a PR in a couple minutes.
Updated by byroot (Jean Boussier) over 1 year ago
Proposed patch: https://github.com/ruby/ruby/pull/7196
Updated by Anonymous over 1 year ago
- Status changed from Open to Closed
Applied in changeset git|3f54d09a5b8b6e4fd734abc8911e170d5967b5b0.
bignum.c: rb_int_parse_cstr handle 0
strings
[Bug #19390]
We shouldn't check the string length when skipping zeros, as the
string might only contains zero characters, resulting in an empty string.
Updated by naruse (Yui NARUSE) over 1 year ago
- Backport changed from 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONE
ruby_3_2 5a2b28909ece2e1310250180f097bfcb7b0203dc merged revision(s) 3f54d09a5b8b6e4fd734abc8911e170d5967b5b0.
Actions
Like0
Like0Like0Like0