When they first met, Yoda was debating whether or not to kill Luke Skywalker.
When Luke Skywalker first arrived on Dagobah, Yoda acted the part of a simpleton in an apparent test of character. He demanded a flashlight in return for his help. He made Luke return to his home and eat his crappy food. He tested Luke's patience -- and found Luke's patience wanting.
What would he have done if the disembodied voice of Obi Wan hadn't intervened?
As someone who grew up a die-hard Star Wars fan now living in the post-George Lucas Is Obviously An Idiot (GLIOAI) era, it is tempting to basically throw up one's hands and say, "Who knows what Yoda would have done -- George Lucas is obviously an idiot, so he probably never really thought about that since everything in this stupid universe is obviously a jerry-rigged fabrication held together with spit and duct tape."
And indeed, in some cases this reasoning applies. In the very scene at issue, for example, there is a curious moment where Yoda says that Luke is too old to begin his training. Clearly Luke is just a kid, and clearly Yoda is just searching for an excuse because he fundamentally does not believe Luke will ever make a good Jedi. But this throwaway line (presumably written by Lawrence Kasdan, since it's a telling line of dialogue that you can imagine coming out of the mouth of a real person) was subsequently viciously raped by George Lucas, producing the bastard offspring of the little kid Jedi's in the prequels. This last development we can write off to the fact that GLIOAI.
But the larger issue -- should Yoda begin training Luke? -- is fundamental to the whole structure of the movie, which in and of itself does not suck and can be taken as worth consideration. And it implies the question, what would happen if Yoda did not begin training Luke?
There is only one answer. Luke was potentially the most powerful person in the galaxy, and Yoda was all too aware of the Emperor's ability to turn a naive young man to the Dark Side. There is no way Yoda could let Luke leave Dagobah alive without the Jedi training under his belt to resist temptation. Indeed, even after his training, allowing Luke to leave for Bespin was a calculated risk.
But if Luke had been untrainable -- as Yoda thought before Obi Way intervened on his behalf -- there was only one option: Yoda would have to kill him. Not the most noble thing a Jedi had ever done, but eminently justifiable and indeed the only moral course of action.