Use `map!` when you want to transform a collection’s elements in place. Unlike `map`, which builds a new array of block results, `map!` replaces the elements in its receiver. It is also called `collect!`. section 10.6.1 section 10.6.2
Uppercase an existing array
`names = %w(David Yukihiro Chad Amy)` followed by `names.map!(&:upcase)` changes the `names` array itself. Use `names.map { |name| name.upcase }` instead when you want a new array of uppercase names. section 10.6.2 section 10.6
The block’s result matters, not merely what the block does along the way. A block ending in `puts` returns `nil`; with `map`, that produces an array of `nil` values. `map!` uses block results as replacements, so choose a block that returns the values you want to keep. section 10.6.1 section 10.6.2
`Array#map!` belongs to `Array`, not `Enumerable`: a general `map` can return an array even when its receiver is another kind of enumerable, but in-place mapping requires a suitable receiver. Sets also provide `map!`. section 10.6.2

