1. Michael Granger
  2. Linguistics

Commits

Michael Granger  committed f521914 Merge

Merge pull request #4 from ippeiukai/fix-issue8-past_tense_for_doubling_verbs

fix past tense for doubling verbs

  • Participants
  • Parent commits 36821e2, e3211dc
  • Branches default

Comments (0)

Files changed (2)

File lib/linguistics/en/conjugation.rb

View file
 			return verb[ 0..-1 ] + 'ied'
 		else
 			if DOUBLING_VERBS.include?( verb )
-				verb = verb[ -2..-1 ] + 'ed'
+				verb = verb + verb[ -1 ] + 'ed'
 			else
 				return verb + 'ed'
 			end

File spec/linguistics/en/conjugation_spec.rb

View file
 		"spoonfeed".en.past_tense.should == 'spoonfed'
 	end
 
+	it "conjugates 'spot' as 'spotted'" do
+		"spot".en.past_tense.should == 'spotted'
+	end
+
 	it "conjugates 'spread' as 'spread'" do
 		"spread".en.past_tense.should == 'spread'
 	end