Skip to content

Rackup::Server.start :port to be :Port? #37

@rubyFeedback

Description

@rubyFeedback

I have had code like this:

Rackup::Server.start(
  app:  SomeApp.new,
  port: 12345   
)

This was not working, though, due to :port and I looked at the source.

There I found that it was :Port. Would it be possible to treat both lowercase
(first letter that is) and uppercase (again first letter) the same?

It is not a huge thing, I can adapt, but I was surprised that :port did not work
but :Port does. I assume this was inherited from webrick? Either way it seems
quite unusual to focus on capitalized keys in a Hash, as a symbol. Most often
we use the downcased variant instead. Either way, I think the best solution
would be to allow both capitalized and non-capitalized, for all options that
would make sense - so, :port would be the same as :Port and so forth.

Again, it is such a minor thing - not sure whether I should even report it,
but it confused me for a little while, until I today decided to look into the
source and found that :port is not the same as :Port.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions