rcstorable 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/ext/rcstorable.c +3 -3
- data/spec/rcstorable_spec.rb +1 -1
- data/spec/store.pl +3 -1
- metadata +1 -2
- data/spec/test.store +0 -0
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/ext/rcstorable.c
CHANGED
@@ -173,7 +173,7 @@ read_n_array_entries(VALUE array, int num)
|
|
173
173
|
/*
|
174
174
|
* Given a size, read in a string of that size. Note that Storable seems to use 319 as a
|
175
175
|
* magic value, meaning the string should be read until a very low character is found.
|
176
|
-
* I should test this more specifically, but it's somewhere lower than "
|
176
|
+
* I should test this more specifically, but it's somewhere lower than "\t", aka 7.
|
177
177
|
*/
|
178
178
|
static VALUE
|
179
179
|
read_string(bool extended_size)
|
@@ -186,8 +186,8 @@ read_string(bool extended_size)
|
|
186
186
|
int rem;
|
187
187
|
char *tp = serialized;
|
188
188
|
|
189
|
-
if (size == 319) { // apparently Storable uses \000\000\001\077 to mean "read until n<
|
190
|
-
while (*tp++ >=
|
189
|
+
if (size == 319) { // apparently Storable uses \000\000\001\077 to mean "read until n<7"
|
190
|
+
while (*tp++ >= 7) {
|
191
191
|
check_pointer(tp);
|
192
192
|
actual_size++;
|
193
193
|
}
|
data/spec/rcstorable_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe RCStorable do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should correctly decode format B" do
|
15
|
-
store = "
|
15
|
+
store = "\005\a\003\000\000\000\004\004\003\000\000\000\002\n\004blah\000\000\000\001p\001\000\000\002>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\000\000\000\001q\000\000\000\001c\n\00229\000\000\000\017longer_key_name\n\020A longish string\000\000\000\001a\n\00235\000\000\000\001b"
|
16
16
|
|
17
17
|
expected = {
|
18
18
|
"a" => "A longish string",
|
data/spec/store.pl
CHANGED
@@ -15,5 +15,7 @@ my %blah = (
|
|
15
15
|
"longer_key_name" => "29",
|
16
16
|
);
|
17
17
|
|
18
|
-
|
18
|
+
#my $x = "004\a\b12345678\004\b\b\b\003\004\000\000\000\004\003\002\000\000\000\n\004blah\001\000\000\000p\001>\002\000\000Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\001\000\000\000q\001\000\000\000c\n\00229\017\000\000\000longer_key_name\n\020A longish string\001\000\000\000a\n\00235\001\000\000\000b";
|
19
|
+
|
20
|
+
print Storable::nfreeze(\%blah);
|
19
21
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcstorable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burke Libbey
|
@@ -31,7 +31,6 @@ files:
|
|
31
31
|
- ext/rcstorable.c
|
32
32
|
- spec/rcstorable_spec.rb
|
33
33
|
- spec/store.pl
|
34
|
-
- spec/test.store
|
35
34
|
has_rdoc: true
|
36
35
|
homepage: http://canadadrugs.com
|
37
36
|
licenses: []
|
data/spec/test.store
DELETED
Binary file
|