Skip to content
This repository was archived by the owner on Aug 20, 2020. It is now read-only.
This repository was archived by the owner on Aug 20, 2020. It is now read-only.

Support JRuby-9.2.x.x #17

@ThomasKoppensteiner

Description

@ThomasKoppensteiner

Please support JRuby-9.2.x.x.

The Net::HTTP call made in

def WebService.make_request(path_and_query, *args)
      url = Geonames.base_url + path_and_query
      url += "&username=#{Geonames.username}" if Geonames.username
      url += "&password=#{Geonames.password}" if Geonames.password
      url += "&radius=#{Geonames.radius}"
      url += "&lang=#{Geonames.lang}"
      options = {
        :open_timeout => 60,
        :read_timeout => 60
      }
      options.update(args.last.is_a?(::Hash) ? args.pop : {})
      uri = URI.parse(url)
      req = Net::HTTP::Get.new(uri.path + '?' + uri.query)
      Net::HTTP.start(uri.host, uri.port) { |http|
        http.read_timeout = options[:read_timeout]
        http.open_timeout = options[:open_timeout]
        http.request(req)
      }
end

fails with "NoMethodError: undefined method `<<' for {:read_timeout=>60, :continue_timeout=>nil, :debug_output=>nil}:Hash", when JRuby-9.2.9.0 is used.

It works with when JRuby-9.1.13.0 is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions