class TZInfo::UnaryMinusGlobalStringDeduper
def dedupe(string)
Experimental RBS support (using type sampling data from the type_fusion
project).
def dedupe: (String string) -> untyped
This signature was generated using 7 samples from 1 application.
-
(bool)
- `string` if it is frozen, otherwise a frozen, possibly
Parameters:
-
string
(String
) -- the string to deduplicate.
Other tags:
- Private: -
def dedupe(string) # String#-@ on Ruby 2.6 will dedupe a frozen non-literal String. Ruby # 2.5 will just return frozen strings. # # The pooled implementation can't tell the difference between frozen # literals and frozen non-literals, so must always return frozen String # instances to avoid doing unncessary work when loading format 2 # TZInfo::Data modules. # # For compatibility with the pooled implementation, just return frozen # string instances (acting like Ruby 2.5). return string if string.frozen? -string end