xorcist 1.1.1 → 1.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: fbad7b915d269e6f1b48c15fc1e32ab76819db95
4
- data.tar.gz: 274ddef96836ceb582af475411e4a970b59e3bb8
3
+ metadata.gz: 06bbb12ac79a40c6ce4bd609159dc0567689e7e1
4
+ data.tar.gz: 355bf6c20b64205a41880c1cac2f2409ba35c9fd
5
5
  SHA512:
6
- metadata.gz: a3ac9a41e8d02582c7d9b46d3c417b0a018f36937af2b81a5c7deae5423ead7b55f5d6dcc5e0bfb20c65fcfbabf6f9cb76292dd748c6275404c15ad488d88e8f
7
- data.tar.gz: 54e2721e16a14a0f4e62bae3091c88dafd1f5f612105d9d01d8b21c57d755038aee06987230767351bb4bd00ecd7beab9ec49530c6b4297c141d4e8fd0b6ea41
6
+ metadata.gz: '0359168b7032a57173665b8904317bfaf0f417a6180201a36fd8ecd657b0c33431b2e92d09bdbfc55fcebeebd1a29b7259cafdd5359de9a92b760096d7d470f9'
7
+ data.tar.gz: 83347949fa3bae7a2fbcf7d68b2736c9a18f910558ec85c268cbc9c13a6e02e349fa69d3682294ab766f5d055cf7ea7e6ab6ffb1b41e5546624e866557aad5ab
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,26 +1,13 @@
1
1
  #include <ruby.h>
2
2
 
3
- VALUE Xorcist = Qnil;
4
-
5
- void Init_xorcist();
6
-
7
- VALUE xor_in_place(VALUE self, VALUE x, VALUE y);
8
-
9
3
  VALUE xor_in_place(VALUE self, VALUE x, VALUE y) {
10
- const char *src = 0;
11
- char *dest = 0;
4
+ const char *src;
5
+ char *dest;
12
6
  size_t len;
13
7
  size_t y_len;
14
8
 
15
- if (TYPE(x) != T_STRING) {
16
- rb_raise( rb_eTypeError, "first argument must be a String" );
17
- return Qnil;
18
- }
19
-
20
- if (TYPE(y) != T_STRING) {
21
- rb_raise( rb_eTypeError, "second argument must be a String" );
22
- return Qnil;
23
- }
9
+ Check_Type(x, T_STRING);
10
+ Check_Type(y, T_STRING);
24
11
 
25
12
  rb_str_modify(x);
26
13
  dest = RSTRING_PTR(x);
@@ -41,6 +28,5 @@ VALUE xor_in_place(VALUE self, VALUE x, VALUE y) {
41
28
  }
42
29
 
43
30
  void Init_xorcist() {
44
- Xorcist = rb_define_module("Xorcist");
45
- rb_define_module_function(Xorcist, "xor!", xor_in_place, 2);
31
+ rb_define_module_function(rb_define_module("Xorcist"), "xor!", xor_in_place, 2);
46
32
  }
@@ -1,3 +1,3 @@
1
1
  module Xorcist
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xorcist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Faraz Yashar
@@ -30,7 +30,7 @@ cert_chain:
30
30
  EWAzos45LBmn8UZPzUb/szfC1PTzuQp4R7lUCOqi7ExaZF0oYg7JqkRtHDhV/K/c
31
31
  E0Og3eJcioAAuEM3ujecxGYxFkG7zDNswn47lCy6xVzBk4iF
32
32
  -----END CERTIFICATE-----
33
- date: 2018-02-27 00:00:00.000000000 Z
33
+ date: 2018-08-03 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: bundler
metadata.gz.sig CHANGED
Binary file