Skip to content
  • Dirceu Pereira Tiegs's avatar
    33411ad2
    Fix with_options bug when first argument is a Proc · 33411ad2
    Dirceu Pereira Tiegs authored
    An ArgumentError was being raised when methods were called with (proc,
    options) inside a with_options block:
    
        def my_method(arg1, **kwargs)
          [arg1, kwargs]
        end
    
        # this would raise instead of merging options
        with_options(hello: "world") do
          my_method(proc {}, {fizz: "buzz"})
        end
    
    Fixes #45183
    33411ad2
    Fix with_options bug when first argument is a Proc
    Dirceu Pereira Tiegs authored
    An ArgumentError was being raised when methods were called with (proc,
    options) inside a with_options block:
    
        def my_method(arg1, **kwargs)
          [arg1, kwargs]
        end
    
        # this would raise instead of merging options
        with_options(hello: "world") do
          my_method(proc {}, {fizz: "buzz"})
        end
    
    Fixes #45183
Loading