traildb 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/console +4 -4
- data/lib/traildb.rb +2 -2
- data/lib/traildb/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: 52feecf6273d78d7c6db3d90e31e58d33915d716
|
4
|
+
data.tar.gz: 75b7b9d582d62fcb1808df2ccbf7a6bbd01f9375
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a9e8d25e7830dbd3560664a19f50bb310ef3de292b37c1887e18f7d6baa9e21f187fb93084d5d584a5aab1040389716031f87bd02bea49012334eb97df4059d
|
7
|
+
data.tar.gz: d6f08aca10e886cf5189cf04e65db36fabd762f78180302bb919509d06ebb977380b1c0bdc3e9c1324aa45e3a9f9abb14bc4452ab1d5f2f4c93408749779f358
|
data/bin/console
CHANGED
@@ -7,8 +7,8 @@ require "traildb"
|
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
8
8
|
|
9
9
|
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
|
11
|
-
|
10
|
+
require "pry"
|
11
|
+
Pry.start
|
12
12
|
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
13
|
+
# require "irb"
|
14
|
+
# IRB.start(__FILE__)
|
data/lib/traildb.rb
CHANGED
@@ -150,9 +150,9 @@ module Traildb
|
|
150
150
|
uuid = Traildb.uuid_raw(uuid)
|
151
151
|
n = @ofields.size
|
152
152
|
value_array = FFI::MemoryPointer.new(:string, n)
|
153
|
-
value_array.write_array_of_pointer(values.map{|v|FFI::MemoryPointer.from_string(v)})
|
153
|
+
value_array.write_array_of_pointer(values.map{|v|v.nil? ? nil : FFI::MemoryPointer.from_string(v)})
|
154
154
|
value_lengths = FFI::MemoryPointer.new(:uint64, n)
|
155
|
-
value_lengths.write_array_of_uint64(values.map{|v|v.size})
|
155
|
+
value_lengths.write_array_of_uint64(values.map{|v|v.nil? ? 0 : v.size})
|
156
156
|
ret = Traildb.tdb_cons_add(self, uuid, tstamp, value_array, value_lengths)
|
157
157
|
raise TrailDBError.new("Too many values: %s" % values[ret]) if ret != 0
|
158
158
|
end
|
data/lib/traildb/version.rb
CHANGED