It will not do the same thing:

```rb
"foo.bar.baz".split(".").inject({}) { |current, key| current[key] }
```

vs

```rb
current = {}
"foo.bar.baz".split('.').take_while { |key| current = current[key] }
```