Commits

Michael Granger committed de381a8 Merge

Merge pull request #5 from ippeiukai/fix-issue10-past_tense_for_words_end_with_y

fix past tense for words end with y

Comments (0)

Files changed (2)

lib/linguistics/en/conjugation.rb

 		when /e$/
 			return verb + 'd'
 		when /[^aeiou]y$/
-			return verb[ 0..-1 ] + 'ied'
+			return verb[ 0..-2 ] + 'ied'
 		else
 			if DOUBLING_VERBS.include?( verb )
 				verb = verb + verb[ -1 ] + 'ed'

spec/linguistics/en/conjugation_spec.rb

 		"troubleshoot".en.past_tense.should == 'troubleshot'
 	end
 
+	it "conjugates 'try' as 'tried'" do
+		"try".en.past_tense.should == 'tried'
+	end
+
 	it "conjugates 'typecast' as 'typecast'" do
 		"typecast".en.past_tense.should == 'typecast'
 	end