/usr/lib/ruby/1.9.1/htree/fstr.rb is in libhtree-ruby1.9.1 0.7-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | require 'htree/modules'
module HTree
# :stopdoc:
def HTree.with_frozen_string_hash
if Thread.current[:htree_frozen_string_hash]
yield
else
begin
Thread.current[:htree_frozen_string_hash] = {}
yield
ensure
Thread.current[:htree_frozen_string_hash] = nil
end
end
end
def HTree.frozen_string(str)
if h = Thread.current[:htree_frozen_string_hash]
if s = h[str]
s
else
str = str.dup.freeze unless str.frozen?
h[str] = str
end
else
str = str.dup.freeze unless str.frozen?
str
end
end
# :startdoc:
end
|