jebediah 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jebediah.rb +3 -3
- 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: d3aff5019935887994171f6a22cfbdf4518e63ae
|
4
|
+
data.tar.gz: c69ae9d0872a6eab2764aacf72defcee487c4adf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ef7d27c7450273c30b73ff207f70239d3a6d4c9d184d45813c4ca143c9617815b82f8923bbaaadc8b620e8f55c8e82340d6394c2226aa157290c11f6f392142
|
7
|
+
data.tar.gz: 5ff8b600d27f214ea00c13b8c4971b697678dc7cc7b2b9a9f9f9108106ed90c29829d64fba6ef1dc1b8e9f570f2dece005cad1372ec33602389e21e96fa7834c
|
data/lib/jebediah.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class Jebediah
|
2
2
|
def self.version
|
3
|
-
return "1.0.
|
3
|
+
return "1.0.7"
|
4
4
|
end
|
5
5
|
|
6
6
|
def initialize(dictPaths=nil)
|
@@ -138,7 +138,7 @@ class Jebediah
|
|
138
138
|
end
|
139
139
|
|
140
140
|
# If the phrase doesn't have the same number of words as our nomenclature requires, we can't convert
|
141
|
-
if phrase.length != @dictionaries.length then
|
141
|
+
if phrase.nil? || phrase.length != @dictionaries.length then
|
142
142
|
return nil
|
143
143
|
end
|
144
144
|
|
@@ -171,7 +171,7 @@ class Jebediah
|
|
171
171
|
return nil if phrase.empty?
|
172
172
|
match = longestMatchInDictionary(phrase, dict)
|
173
173
|
return nil if match.nil?
|
174
|
-
|
174
|
+
|
175
175
|
split << match.join("-")
|
176
176
|
phrase = phrase[match.count .. -1]
|
177
177
|
end
|