scon 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scon.rb +3 -1
- data/lib/scon/constants.rb +1 -0
- data/lib/scon/parser.rb +3 -0
- data/lib/scon/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: c9e3aae56313f6d62a4fa76a4fc1ff3545dbc8f8
|
4
|
+
data.tar.gz: 57ab89e1b823f91a663d8c89a2c0ab354c40f0fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74c2f6af2ff3b081114fde6295e0b5c2c34a0a219292bbbb137425ad35fb35b82af521140e81e4d9c34e436de01b8f23cce9bce09e230140b9a5a5dd184b05ff
|
7
|
+
data.tar.gz: 9de5c9581361148ebe37e83b49aef5b787399e0c2531490b141742afb3618dcbf15d19a403d6d88e9e8688aeddb2ee343081c00e72766a2220e5a6b5cf3d06e7
|
data/lib/scon.rb
CHANGED
@@ -30,7 +30,9 @@ module SCON
|
|
30
30
|
def self.string_bytes str
|
31
31
|
bytes = str.encode("utf-8").bytes
|
32
32
|
instr = 0xD0
|
33
|
-
if bytes.length
|
33
|
+
if bytes.length == 0
|
34
|
+
instr = Constants::DATA[:zero_string]
|
35
|
+
elsif bytes.length < 32
|
34
36
|
instr += bytes.length
|
35
37
|
else
|
36
38
|
bytes << 0xFF
|
data/lib/scon/constants.rb
CHANGED
data/lib/scon/parser.rb
CHANGED
data/lib/scon/version.rb
CHANGED