This could be done more simply as: 
	def start_of_word(word,i)
		word[0...i]
	end