Hi,
When adding blocks as filter you need to use for instance replace , which mutates the receiver, in order to mask what you want. This still works, even if you have frozen_string_literal enabled since both k and v are duplicated before this block is called.
filter_this = -> (k,v,_parents) do
k == 'key' ? v.replace('[FILTERED]') : v
end
Will this still work if “The Mutable String Flip” is finally switched in a new Ruby version?