Reduce maximum code point value to not interfere with magic code point values used by parser

This commit is contained in:
Josh Holtrop 2022-06-05 15:24:40 -04:00
parent fe607291f4
commit ba74d0a20a
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
class Propane
class CodePointRange
MAX_CODE_POINT = 0xFFFFFFFF
MAX_CODE_POINT = 0x7FFFFFFF
attr_reader :first
attr_reader :last

View File

@ -54,10 +54,10 @@ class Propane
CodePointRange.new(200, 300)])).to eq [
CodePointRange.new(0, 59),
CodePointRange.new(102, 199),
CodePointRange.new(301, 0xFFFFFFFF)]
CodePointRange.new(301, 0x7FFFFFFF)]
expect(CodePointRange.invert_ranges(
[CodePointRange.new(0, 500),
CodePointRange.new(7000, 0xFFFFFFFF)])).to eq [
CodePointRange.new(7000, 0x7FFFFFFF)])).to eq [
CodePointRange.new(501, 6999)]
end
end