Skip to content
  • Eugene Kenny's avatar
    537b0710
    Copy options before delegating in with_options · 537b0710
    Eugene Kenny authored
    cd31e113 switched to passing options as
    keyword arguments, which always creates a new hash.
    
    9e4ff29f removed a now-unnecessary call
    to `dup`, since the options could no longer be accidentally mutated.
    
    a55620f3 switched back to passing
    options as a positional argument for Ruby < 2.7, but didn't restore the
    call to `dup`, which meant that the same options hash was now passed
    with every method call and mutations leaked from one call to another.
    537b0710
    Copy options before delegating in with_options
    Eugene Kenny authored
    cd31e113 switched to passing options as
    keyword arguments, which always creates a new hash.
    
    9e4ff29f removed a now-unnecessary call
    to `dup`, since the options could no longer be accidentally mutated.
    
    a55620f3 switched back to passing
    options as a positional argument for Ruby < 2.7, but didn't restore the
    call to `dup`, which meant that the same options hash was now passed
    with every method call and mutations leaked from one call to another.
Loading