Skip to content

Version 1.2.0#9

Open
tilo wants to merge 5 commits into
mainfrom
version-1.2.0
Open

Version 1.2.0#9
tilo wants to merge 5 commits into
mainfrom
version-1.2.0

Conversation

@tilo

@tilo tilo commented Jun 13, 2026

Copy link
Copy Markdown
Owner

No description provided.

tilo and others added 4 commits June 12, 2026 14:03
…se tests

Null and NULL join null / None / undefined as recognized spellings of nil
(SQL / R / PHP var_export / YAML / DB-derived input), in BOTH the C extension
and the pure-Ruby parser, in every position the existing spellings work
(top-level, object value, array element). Quoted ("NULL") and embedded
(NULL Island) forms stay strings. Uppercase TRUE/FALSE intentionally NOT added
(thin precedent: PHP/SQL emit lowercase/numeric booleans; only R uses uppercase).

Also adds the corner-case tests discussed: NaN/Infinity (real Float objects,
+Infinity, array elements) and recognized-literal classification boundaries
(quoted stays string; wrong-case stays string).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ring

A leading-zero token now reads as a number when it carries a sign, a
decimal point, or an exponent (+007 -> 7, -000023.5 -> -23.5, 00.0 -> 0.0,
007e2 -> 700.0). A bare leading-zero integer (000001, 02) still reads as a
string, so IDs, zip codes, and account numbers keep their zeros.

C path: fj_try_decimal (quoteless/container) and fj_parse_number
(strict/top-level) consume leading zeros and reject a bare leading-zero
integer. Ruby path: DEC_RE admits leading zeros, numeric_value returns the
string for a bare leading-zero integer, parse_number raises at top level.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eparator

A token like 0_0.5 is 00.5 once the underscore separator is removed, so it
should parse as a number (the dot signals numeric intent) — and identically
on the C and Ruby paths, in containers and at the top level. The C scanners
diverged: their leading-'0' branch entered its digit run-loop only on a
digit, not on '_', so 0_0.5 / 0_0e5 stayed strings (C) while the Ruby
container path already parsed them as numbers. The top-level path raised on
both. All three scanners (fj_try_decimal, fj_parse_number, Ruby
parse_number) now enter the run-loop on '_' too, matching the [1-9] branch;
had_leading_zero is flagged only when a real digit is consumed, so a bare
0_0 / 0_07 still stays a string (raises at the top level).

Defect in the unreleased 1.2.0 leading-zero work; never shipped, so no
CHANGELOG change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.83%. Comparing base (cfd26a3) to head (2a1f619).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #9   +/-   ##
=======================================
  Coverage   99.83%   99.83%           
=======================================
  Files           7        7           
  Lines        1193     1208   +15     
=======================================
+ Hits         1191     1206   +15     
  Misses          2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- CHANGELOG: flag that leading-zero decimals/exponents previously read as
  strings (a String->Float change, not just a new capability), and add the
  `RSpec tests: 1,143` line to match the other entries.
- Align the Null/NULL source list to "SQL / R / PHP / YAML" in README and
  docs/_introduction.md (CHANGELOG and the spec already say PHP).
- Trim the now-redundant inner leading-zero comments in fj_try_decimal and
  fj_parse_number (the outer comment already explains the bare-rejection).

No behavior change; 1143 examples, 0 failures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant