Canonical ruby style is not to check for " == nil", but rather to do:

```ruby
if ! key_str.rindex("/")
  ...
```

since nil will be treated as false in an expression in ruby. You can also use .nil?, but that's redundant here.