Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: crystal-lang/crystal
base: df3399f07556
Choose a base ref
...
head repository: crystal-lang/crystal
compare: 4e079f91809a
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 25, 2017

  1. Avoid misleading error message in HTTP::Params.encode

    Restrict types supported by HTTP::Params.encode to avoid long and confusing
    error messages.
    
    With this change, attempt to use a `Hash` other than `Hash(String, String)`
    will result in a better error message:
    
        require "http/params"
    
        puts HTTP::Params.encode({"foo" => 10})
    
    Output:
    
        no overload matches 'HTTP::Params.encode' with type Hash(String, Int32)
        Overloads are:
         - HTTP::Params.encode(hash : Hash(String, String))
         - HTTP::Params.encode(named_tuple : NamedTuple)
    
    Also includes examples on usage.
    
    Fixes #5172
    luislavena committed Oct 25, 2017
    Copy the full SHA
    488dda7 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2017

  1. Merge pull request #5184 from luislavena/restrict-type-on-http-params…

    …-encode
    
    Avoid misleading error message in HTTP::Params.encode
    asterite committed Oct 26, 2017
    Copy the full SHA
    4e079f9 View commit details
    Browse the repository at this point in the history