conjugate 1.3.10 → 1.3.11
Sign up to get free protection for your applications and to get access to all the features.
- data/conjugate.gemspec +1 -1
- data/lib/conjugate/spanish.rb +6 -1
- metadata +1 -1
data/conjugate.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'conjugate'
|
3
|
-
s.version = '1.3.
|
3
|
+
s.version = '1.3.11'
|
4
4
|
s.date = '2012-02-15'
|
5
5
|
s.summary = "Conjugate Verbs using a version of the templates defined here http://en.wiktionary.org/wiki/Category:Spanish_verb_inflection-table_templates"
|
6
6
|
s.description = s.summary
|
data/lib/conjugate/spanish.rb
CHANGED
@@ -77,7 +77,12 @@ module Conjugate
|
|
77
77
|
word_copy = verb.dup
|
78
78
|
|
79
79
|
inserts.each do |letters|
|
80
|
-
sub_word =
|
80
|
+
sub_word = ""
|
81
|
+
if letters.length <= 1
|
82
|
+
sub_word = word_copy.scan(/(.[^#{letters}]*)#{letters}/).flatten.first
|
83
|
+
else
|
84
|
+
sub_word = word_copy.scan(/(.+)#{letters}/).flatten.first
|
85
|
+
end
|
81
86
|
sub_word ||= ""
|
82
87
|
|
83
88
|
word_parts << sub_word
|