Skip to content

Commit

Permalink
adding
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGeros committed Apr 20, 2012
1 parent 83e4cb9 commit 8b900c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conjugate.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'conjugate'
s.version = '1.3.10'
s.version = '1.3.11'
s.date = '2012-02-15'
s.summary = "Conjugate Verbs using a version of the templates defined here http://en.wiktionary.org/wiki/Category:Spanish_verb_inflection-table_templates"
s.description = s.summary
Expand Down
7 changes: 6 additions & 1 deletion lib/conjugate/spanish.rb
Expand Up @@ -77,7 +77,12 @@ def divide_infinitive(infinitive, verb)
word_copy = verb.dup

inserts.each do |letters|
sub_word = word_copy.scan(/(.[^#{letters}]*)#{letters}/).flatten.first
sub_word = ""
if letters.length <= 1
sub_word = word_copy.scan(/(.[^#{letters}]*)#{letters}/).flatten.first
else
sub_word = word_copy.scan(/(.+)#{letters}/).flatten.first
end
sub_word ||= ""

word_parts << sub_word
Expand Down

0 comments on commit 8b900c3

Please sign in to comment.