Commits

ippeiukai committed 5aff030

fix present participle conjugation of verbs that end with 'e'

Comments (0)

Files changed (2)

lib/linguistics/en/conjugation.rb

 	def conjugate_present_participle( verb )
 		case verb
 		when /[^aeiou]e$/
-			return verb[ 0..-2 ]
+			return verb[ 0..-2 ] + 'ing'
 		when /ie$/
-			return verb[ 0..-3 ] + 'y'
+			return verb[ 0..-3 ] + 'y' + 'ing'
 		when /[aou]e$/
-			return verb[ 0..-2 ]
+			return verb[ 0..-2 ] + 'ing'
 		else
 			if DOUBLING_VERBS.include?( verb )
 				return verb + verb[ -1 ] + 'ing'

spec/linguistics/en/conjugation_spec.rb

 		"write".en.past_tense.should == 'wrote'
 	end
 
-	it "conjugates 'wrought' as 'wrought'" do
-		"wrought".en.past_tense.should == 'wrought'
+	it "conjugates 'take' as 'taking'" do
+		"take".en.present_participle.should == 'taking'
+	end
+
+	it "conjugates 'die' as 'dying'" do
+		"die".en.present_participle.should == 'dying'
 	end
 
 end