Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fix adapters from JSON definitions being ignored. #203

merged 1 commit into from

2 participants


All whois queries currently just use the Standard adapter since Whois::Server.factory looks for the adapter option as a symbol, but JSON parses keys as strings by default. Fixed so that the proper adapters are used again.


Thanks @linrock for pointing it out!

@weppos weppos merged commit dd56b67 into weppos:master

1 check passed

Details default The Travis build passed
@weppos weppos referenced this pull request from a commit
@weppos Convert options to Symbol when loading the JSON.
Alternative solution to GH-203.

@linrock I changed the implementation a little bit to convert the options when the file is loaded (to save memory) and I added a test.

Thanks for reporting the issue.


Sounds good! Just needed to get a quick fix in to pave way for #204.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 5, 2013
  1. @linrock
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/whois/server.rb
2  lib/whois/server.rb
@@ -179,7 +179,7 @@ def self.define(type, allocation, host, options = {})
# An adapter that can be used to perform queries.
def self.factory(type, allocation, host, options = {})
- options = options.dup
+ options = Hash[ {|k,v| [k.to_sym, v] }]
adapter = options.delete(:adapter) || Adapters::Standard
adapter = Adapters.const_get(camelize(adapter)) unless adapter.respond_to?(:new), allocation, host, options)
Something went wrong with that request. Please try again.