skylight 0.3.1 → 0.3.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: 4005d9f17790586799b47b937adeaf32049239cb
4
- data.tar.gz: b58afb77fd648bfbdc904a305161fb57a47ceeb1
3
+ metadata.gz: d35e2f9002822fce35de8e6057507c7580f96481
4
+ data.tar.gz: 3579cfe7ab62384b05ac59c3151c25f33b86a000
5
5
  SHA512:
6
- metadata.gz: e7c5939f477c3902f1684b20fb5030aef6bdc7554dd395589792dcbd6421224b75a60a9fd0e8d4292296afede7c3e582e8cf399af866e67ad8d2f7b855ccbfd1
7
- data.tar.gz: 9c5a136bc94db3c8bc51c80ec4ae191a23d6cb5e9eded4dc0e5bdcb1a60e5e1dd006bad9965bb9c9402195b8684849cb4783ec4160b705bbab9800ec2d586789
6
+ metadata.gz: fdde6a8043068fa425b4ef412e895fe0fd9c0ebb99776e8505069357eb7ed59ba8134ac6a1e16f35882162eebc49d5ab6230340bdd59cc7e4e4859154e2264a5
7
+ data.tar.gz: 000c1d8ca54a68d00d7c099cf57f8704ba97563d0e384950acb643066cf23029c5cff2664a4884491af69881f49f176e4237ad2f4e940e9e78d67f62aaedeb89
@@ -1,3 +1,8 @@
1
+ ## 0.3.2 (March 11, 2014)
2
+
3
+ * Autoload Skylight:Helpers even when native agent isn't available
4
+ * Fix SEGV
5
+
1
6
  ## 0.3.1 (March 8, 2014)
2
7
 
3
8
  * Fix requires to allow CLI to function without native extension.
@@ -1,6 +1,10 @@
1
1
  #include <ruby.h>
2
2
  #include <stdbool.h>
3
3
 
4
+ #ifdef HAVE_RUBY_ENCODING_H
5
+ #include <ruby/encoding.h>
6
+ #endif
7
+
4
8
  /**
5
9
  * Ruby helpers
6
10
  */
@@ -64,8 +68,9 @@ typedef struct {
64
68
  } RustSlice;
65
69
 
66
70
  typedef rust_str * RustString;
67
- #define VEC2STR(string) ({ RustString s = (string); VALUE ret = rb_str_new((char *)s->data, s->fill); ret; })
68
- #define SLICE2STR(slice) ({ RustSlice s = (slice); rb_str_new(s.data, s.len); })
71
+ typedef RustString RustVector;
72
+ #define VEC2STR(vector) ({ RustVector v = (vector); VALUE ret = rb_str_new((char *)v->data, v->fill); ret; })
73
+ #define SLICE2STR(slice) ({ RustSlice s = (slice); VALUE str = rb_str_new(s.data, s.len); rb_enc_associate(str, rb_utf8_encoding()); str; })
69
74
  #define STR2SLICE(string) ({ RustSlice s; VALUE rb_str = (string); s.data = RSTRING_PTR(rb_str); s.len = RSTRING_LEN(rb_str); s; })
70
75
 
71
76
  #define UnwrapOption(T, val, transform) ({ T * v = (val); VALUE ret; if (v == NULL) ret = Qnil; else ret = transform(*v); ret; })
@@ -19,6 +19,7 @@ module Skylight
19
19
  autoload :Api, 'skylight/api'
20
20
  autoload :CLI, 'skylight/cli'
21
21
  autoload :Config, 'skylight/config'
22
+ autoload :Helpers, 'skylight/helpers'
22
23
 
23
24
  module Util
24
25
  autoload :Logging, 'skylight/util/logging'
@@ -45,7 +46,6 @@ module Skylight
45
46
  end
46
47
 
47
48
  autoload :GC, 'skylight/gc'
48
- autoload :Helpers, 'skylight/helpers'
49
49
  autoload :Instrumenter, 'skylight/instrumenter'
50
50
  autoload :Messages, 'skylight/messages'
51
51
  autoload :Middleware, 'skylight/middleware'
@@ -1,4 +1,4 @@
1
1
  module Skylight
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skylight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilde, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-09 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport