, , , "" "-" -, , "" "-".
something another . another another = (another[x] ||= {}). , something.object_id another.object_id.
another {}
,
another = (another[x] ||= {})
another , (another[x] ||= {}), {}, another {}
, , , , another, another something .
something = {}
another = something
('a'...'f').each do |x|
puts "another = #{another} and x= #{x} and something = #{something}"
another[x] ||= {}
end
puts something
:
another = {} and x= a and something = {}
another = {"a"=>{}} and x= b and something = {"a"=>{}}
another = {"a"=>{}, "b"=>{}} and x= c and something = {"a"=>{}, "b"=>{}}
another = {"a"=>{}, "b"=>{}, "c"=>{}} and x= d and something = {"a"=>{}, "b"=>{}, "c"=>{}}
another = {"a"=>{}, "b"=>{}, "c"=>{}, "d"=>{}} and x= e and something = {"a"=>{}, "b"=>{}, "c"=>{}, "d"=>{}}
=> "a"..."f"
2.1.0 :265 > puts something
{"a"=>{}, "b"=>{}, "c"=>{}, "d"=>{}, "e"=>{}}