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

Fix to PR #11 so it will work with Ruby 1.9.3 #15

Merged
merged 2 commits into from
Sep 15, 2015

Conversation

b-dean
Copy link
Contributor

@b-dean b-dean commented Sep 2, 2015

This change is a small fix to @gamepoet's PR #11 so that it works with Ruby 1.9.3. In Ruby 2 Net::HTTP::Post.new can take a uri or a path (String), but in Ruby 1.9.3 it needs to be a String. Otherwise you get a NoMethodError for URI#empty? on this line: https://github.com/ruby/ruby/blob/v1_9_3_551/lib/net/http.rb#L1861

In Ruby 2.x net/http has changed a lot and it can deal with a URI being passed into the constructor for requests. Here it's calling URI#request_uri to get the path when the arg is a URI. https://github.com/ruby/ruby/blob/v2_0_0_0/lib/net/http/generic_request.rb#L19

gamepoet and others added 2 commits April 19, 2013 09:55
This allows commands like 'new' and 'edit' that possibly contain a large
amount of data (i.e. for sEvent) to not exceed the server's max length
for an HTTP GET request.
@gamepoet
Copy link
Contributor

gamepoet commented Sep 3, 2015

Nice! 👍

szechyjs added a commit that referenced this pull request Sep 15, 2015
Fix to PR #11 so it will work with Ruby 1.9.3
@szechyjs szechyjs merged commit b96985e into relatel:master Sep 15, 2015
@b-dean b-dean deleted the ruby193 branch September 16, 2015 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants