ruby / ruby/webrick

@config = default.dup.update(config)

Open
#150 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
327
Forks
112
Avg merge
4h 2m
Merged PRs (30d)
1

Description

/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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/main.rb:57, where the WEBrick server is constructed, and compare the argument passed into initialization with the configuration shown in the stack trace. Reproduce the failure with Ruby 3.3.2 on FreeBSD 14, then verify that the server initializes without the TypeError and handles the intended configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.