Permalink
Browse files

adding

  • Loading branch information...
1 parent 83e4cb9 commit 8b900c3e5d91533aaac33aca24881d920c3d57ca @JeremyGeros committed Apr 20, 2012
Showing with 7 additions and 2 deletions.
  1. +1 −1 conjugate.gemspec
  2. +6 −1 lib/conjugate/spanish.rb
View
@@ -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
View
@@ -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

0 comments on commit 8b900c3

Please sign in to comment.