Reduce maximum code point value to not interfere with magic code point values used by parser
This commit is contained in:
1 parent
fe607291f4
commit
ba74d0a20a
2 files changed
+3
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
class Propane
|
||||
class CodePointRange
|
||||
|
||||
MAX_CODE_POINT = 0xFFFFFFFF
|
||||
MAX_CODE_POINT = 0x7FFFFFFF
|
||||
|
||||
attr_reader :first
|
||||
attr_reader :last
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user