• G
    Work around for upstream Ruby bug #10685 · 707a4338
    Genadi Samokovarov 提交于
    In f6e293ec we avoided a segfault in the
    tests, however I think we should try to avoid the crash, as it may
    happen in user code as well.
    
    Here is what I distiled the bug down to:
    
    ```ruby
    # Rails case - works on 2.0, 2.1; crashes on 2.2
    require 'action_dispatch'
    
    ActionDispatch::Response.new(200, "Content-Type" => "text/xml")
    
    # General case - works on 2.0, 2.1; crashes on 2.2
    def foo(optional = {}, default_argument: nil)
    end
    
    foo('quux' => 'bar')
    ```
    707a4338
response.rb 9.9 KB