2 Matching Annotations
- Mar 2021
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
data = {}.extend XKeys::Auto # Vs ::Hash, uses arrays for int keys data[:users, 0, :name] # nil data[:users, 0, :name, :raise => true] # KeyError data[:users, :[], :name] = 'Matz' # :[] is next index, 0 in this case # {:users=>[{:name=>"Matz"}]} pick = [:users, 0, :name] data[*pick] # Matz data[:users, 0, :accesses, :else => 0] += 1 # {:users=>[{:name=>"Matz", :accesses=>1}]}
-
-
github.com github.com
-
No docs?!
[ Some docs here; First saw it here: ] https://bugs.ruby-lang.org/issues/11747#note-7
-