Alternatively, you can [create a new Hash](http://ruby-doc.org/core-2.1.0/Hash.html#method-c-5B-5D) and freely mutate.

```ruby
def whitelist
  whitelist = Hash[context[:whitelist] || WHITELIST]
  whitelist[:protocols]['a'] = (whitelist[:protocols]['a'] || {}).merge('href' => anchor_schemes)
  whitelist
end
```

```ruby
>> WHITELIST = { :protocols => { 'img' => {'src' => ['http', 'https', :relative]} }, :elements=>["h1", "h2", "h3", "h4", "h5", "h6", "h7", "h8", "br", "b", "i", "strong", "em", "a", "pre", "code", "img", "tt"]}
=> {:protocols=>{"img"=>{"src"=>["http", "https", :relative]}}, :elements=>["h1", "h2", "h3", "h4", "h5", "h6", "h7", "h8", "br", "b", "i", "strong", "em", "a", "pre", "code", "img", "tt"]}
>> context = { :whitelist => { :protocols => { 'img' => {'src' => ['http', :relative]} }, :elements => %w(h1) } }
=> {:whitelist=>{:protocols=>{"img"=>{"src"=>["http", :relative]}}, :elements=>["h1"]}}
>> whitelist = Hash[context[:whitelist] || WHITELIST]
>> whitelist.object_id
=> 70126715050300
>> context.object_id
=> 70126715078840
>> WHITELIST.object_id
=> 70126715133160
>> whitelist = {}
=> {}
>> WHITELIST
=> {:protocols=>{"img"=>{"src"=>["http", "https", :relative]}}, :elements=>["h1", "h2", "h3", "h4", "h5", "h6", "h7", "h8", "br", "b", "i", "strong", "em", "a", "pre", "code", "img", "tt"]}
>> context
=> {:whitelist=>{:protocols=>{"img"=>{"src"=>["http", :relative]}}, :elements=>["h1"]}}
```

Hope this helps!