curl_escape 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cc7b71d0852a4742c04075e57c59a9548afab18
4
- data.tar.gz: 90d77f2ba82fb50bb2760750a425eccc05f9aaa8
3
+ metadata.gz: d8390d31939a8de3b2c4c1bb52d1d77898c8c0f7
4
+ data.tar.gz: c16f6b8f2a78bc496e5634b175aad69ddb85ba8a
5
5
  SHA512:
6
- metadata.gz: 644f12380a3198872682c5d4bc0a42449a2e06066beb01909ce13adb749415090954142a9986e30fa2fcb0fe0bde37e3e6af7771ce4ac0a1f121ed2edeb682cc
7
- data.tar.gz: 5892f35b9904110e2681994aa724b2248cd331dba4bce1feb3fb173ab484c0d40a60ebdb92d3ba4591c2075b4a9e1b8efb6a992fac4e09aebf7a89377ae2b9e4
6
+ metadata.gz: ceb049e7c505ca7c76be84001d0407bc087eef8c0ce368980d909b535fe382b6fe6928dc924565dc3ab0c302b4976bbb8e13a9943be6b5c874d40d35da7c1477
7
+ data.tar.gz: 892b19c1a63591f33bb3d54d8591ee774f1f70da0ae4455f1058f4da39a2b9d4cc9fc883b55d9cadc3f1b4e3fb305fccc12d0ed19853c05e0a5a49e6795a0923
@@ -1,6 +1,7 @@
1
1
  #include <string.h>
2
2
  #include <curl/curl.h>
3
3
  #include <ruby.h>
4
+ #include <ruby/encoding.h>
4
5
 
5
6
  VALUE ruby_curl_escape(VALUE self, VALUE str) {
6
7
  int cnt;
@@ -34,7 +35,8 @@ VALUE ruby_curl_escape(VALUE self, VALUE str) {
34
35
  }
35
36
  buf[pos++] = '\0';
36
37
 
37
- output = rb_str_new2(buf);
38
+ rb_encoding* enc = rb_enc_get(str);
39
+ output = rb_enc_str_new_cstr(buf, enc);
38
40
  curl_free(cOutput);
39
41
  return output;
40
42
  } else {
@@ -1,3 +1,3 @@
1
1
  module CurlEscape
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curl_escape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007