ruby / webrick

HTTP server toolkit
BSD 2-Clause "Simplified" License
283 stars 96 forks source link

@config = default.dup.update(config) #150

Open z3nnix opened 1 month ago

z3nnix commented 1 month ago
/usr/home/zennix/.local/share/gem/ruby/3.3/gems/webrick-1.8.2/lib/webrick/server.rb:89:in `update': no implicit conversion of String into Hash (TypeError)

      @config = default.dup.update(config)
                                   ^^^^^^
        from /usr/home/zennix/.local/share/gem/ruby/3.3/gems/webrick-1.8.2/lib/webrick/server.rb:89:in `initialize'
        from /usr/home/zennix/.local/share/gem/ruby/3.3/gems/webrick-1.8.2/lib/webrick/httpserver.rb:47:in `initialize'
        from src/main.rb:57:in `new'
        from src/main.rb:57:in `<main>'
[zennix@s12]:<~/y0d9>$

ruby version and host information:

[zennix@s12]:<~/y0d9>$ ruby -v
ruby 3.3.2 (2024-05-30 revision e5a195edf6) [amd64-freebsd14]

What did I do wrong? ;c

jeremyevans commented 1 month ago

It looks config is a string, but you need to provide a hash to update.