curl_escape 0.1.1 → 0.1.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.
- checksums.yaml +4 -4
- data/ext/curl_escape/curl_escape.c +3 -1
- data/lib/curl_escape/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8390d31939a8de3b2c4c1bb52d1d77898c8c0f7
|
4
|
+
data.tar.gz: c16f6b8f2a78bc496e5634b175aad69ddb85ba8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 {
|
data/lib/curl_escape/version.rb
CHANGED