Question: what is the best way to convert an array of

```
arr = ["one", "two", "three", "four", "five"]

```

to hash of

```
{"one"=>0, "two"=>0, "three"=>0, "four"=>0, "five"=>0}

```

Iam planning to fillup the '0' with my own values later, I just need the technique now.

Thanks.

Answer: 
```
arr.product([0]).to_h

```

or for versions < 2.0

```
Hash[arr.product([0])]

```
I would do this:

```
arr.inject({}) { |hash, key| hash.update(key => 0) }

```