Skip to content

Commit

Permalink
Merge pull request #143 from geronime/master
Browse files Browse the repository at this point in the history
Fix #133, fix warnings.
  • Loading branch information
taf2 committed Feb 6, 2013
2 parents 713ae83 + 4e822de commit 0d11a1f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ext/curb_easy.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,8 @@ static VALUE ruby_curl_easy_post_body_set(VALUE self, VALUE post_body) {
curl = rbce->curl;

if ( post_body == Qnil ) {
//rbce->postdata_buffer = Qnil;
rb_easy_del("postdata_buffer");
curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);

} else {
if (rb_type(post_body) == T_STRING) {
Expand Down
3 changes: 0 additions & 3 deletions lib/curb.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
require 'curb_core'
require 'curl'
require 'curl/easy'
require 'curl/multi'
4 changes: 3 additions & 1 deletion lib/curl.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require 'curb'
require 'curb_core'
require 'curl/easy'
require 'curl/multi'
require 'uri'

# expose shortcut methods
Expand Down
10 changes: 5 additions & 5 deletions lib/curl/easy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class << self
# the +http_get+ call.
#
def perform(*args)
c = Curl::Easy.new *args
c = Curl::Easy.new(*args)
yield c if block_given?
c.perform
c
Expand All @@ -327,7 +327,7 @@ def perform(*args)
# the +http_get+ call.
#
def http_get(*args)
c = Curl::Easy.new *args
c = Curl::Easy.new(*args)
yield c if block_given?
c.http_get
c
Expand All @@ -344,7 +344,7 @@ def http_get(*args)
# the +http_head+ call.
#
def http_head(*args)
c = Curl::Easy.new *args
c = Curl::Easy.new(*args)
yield c if block_given?
c.http_head
c
Expand Down Expand Up @@ -383,7 +383,7 @@ def http_post(*args)
url = args.shift
c = Curl::Easy.new url
yield c if block_given?
c.http_post *args
c.http_post(*args)
c
end

Expand All @@ -398,7 +398,7 @@ def http_post(*args)
# the +http_delete+ call.
#
def http_delete(*args)
c = Curl::Easy.new *args
c = Curl::Easy.new(*args)
yield c if block_given?
c.http_delete
c
Expand Down

0 comments on commit 0d11a1f

Please sign in to comment.