D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Prism
/
CodeUnitsCache
/
Filename :
cdesc-CodeUnitsCache.ri
back
Copy
U:RDoc::NormalClass[iI"CodeUnitsCache:ETI"Prism::CodeUnitsCache;TI"Object;To:RDoc::Markup::Document:@parts[o;;[ o:RDoc::Markup::Paragraph;[I"MA cache that can be used to quickly compute code unit offsets from byte ;TI"Noffsets. It purposefully provides only a single #[] method to access the ;TI"-cache in order to minimize surface area.;To:RDoc::Markup::BlankLine o; ;[I"QNote that there are some known issues here that may or may not be addressed ;TI"in the future:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"PThe first is that there are issues when the cache computes values that are ;TI"Mnot on character boundaries. This can result in subsequent computations ;TI")being off by one or more code units.;To;;0;[o; ;[I"NThe second is that this cache is currently unbounded. In theory we could ;TI"Ointroduce some kind of LRU cache to limit the number of entries, but this ;TI""has not yet been implemented.;T: @fileI"lib/prism/parse_result.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ [ [[I" class;T[[:public[[I"new;TI"lib/prism/parse_result.rb;T[:protected[ [:private[ [I" instance;T[[;[[I"[];T@4[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@(I" Prism;TcRDoc::NormalModule