File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -791,7 +791,6 @@ in *Ruby* now, not in *Python*.
791791
792792# # Collections
793793
794- * It ' s ok to use arrays as sets for a small number of elements.
795794* Prefer ` %w` to the literal array syntax when you need an array of
796795strings.
797796
@@ -810,7 +809,10 @@ strings.
810809 arr[100] = 1 # now you have an array with lots of nils
811810 ` ` `
812811
813- * Use `Set` instead of `Array` when dealing with lots of elements.
812+ * Use ` Set` instead of ` Array` when dealing with unique elements. ` Set`
813+ implements a collection of unordered values with no duplicates. This
814+ is a hybrid of ` Array` ' s intuitive inter-operation facilities and
815+ `Hash`' s fast lookup.
814816* Use symbols instead of strings as hash keys.
815817
816818 ` ` ` Ruby
You can’t perform that action at this time.
0 commit comments