I prefer to do the assignment inside the if:

if original_value.is_a?(Hash) && new_value.is_a?(Hash)
  self[key] = original_value.deep_merge(new_value, &block)
elsif if block && original_value
  self[key] = block.call(key, original_value, new_value)
else
  self[key] = new_value
```

This is easier to read and to know what if that else clause is refering