ghazel-curb 0.6.2.1 → 0.6.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/ext/curb_easy.c +7 -4
  2. metadata +1 -1
data/ext/curb_easy.c CHANGED
@@ -706,6 +706,7 @@ static VALUE ruby_curl_easy_put_data_set(VALUE self, VALUE data) {
706
706
  ruby_curl_easy *rbce;
707
707
  CURL *curl;
708
708
  VALUE upload;
709
+ VALUE headers;
709
710
 
710
711
  Data_Get_Struct(self, ruby_curl_easy, rbce);
711
712
 
@@ -732,7 +733,7 @@ static VALUE ruby_curl_easy_put_data_set(VALUE self, VALUE data) {
732
733
  }
733
734
  }
734
735
 
735
- VALUE headers = rb_easy_get("headers");
736
+ headers = rb_easy_get("headers");
736
737
  if( headers == Qnil ) {
737
738
  headers = rb_hash_new();
738
739
  }
@@ -896,12 +897,14 @@ static VALUE ruby_curl_easy_proxy_type_get(VALUE self) {
896
897
  static VALUE ruby_curl_easy_http_auth_types_set(int argc, VALUE *argv, VALUE self) {//VALUE self, VALUE http_auth_types) {
897
898
  ruby_curl_easy *rbce;
898
899
  VALUE args_ary;
899
- rb_scan_args(argc, argv, "*", &args_ary);
900
- Data_Get_Struct(self, ruby_curl_easy, rbce);
901
- int i, len = RARRAY_LEN(args_ary);
900
+ int i, len;
902
901
  char* node = NULL;
903
902
  long mask = 0x000000;
904
903
 
904
+ rb_scan_args(argc, argv, "*", &args_ary);
905
+ Data_Get_Struct(self, ruby_curl_easy, rbce);
906
+ len = RARRAY_LEN(args_ary);
907
+
905
908
  if (len == 1 && (TYPE(rb_ary_entry(args_ary,0)) == T_FIXNUM || rb_ary_entry(args_ary,0) == Qnil)) {
906
909
  if (rb_ary_entry(args_ary,0) == Qnil) {
907
910
  rbce->http_auth_types = 0;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghazel-curb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2.1
4
+ version: 0.6.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Bamford