The book of Ruth is brief story of unforced compassion. When tragedy struck, Ruth had no obligation to help her mother-in-law, but chose to stay with her anyway. Boaz was not required to care for or redeem Ruth, but chose to pay the price anyway. This makes it easy to see why people might make a connection between the life of Ruth and Matthew 5:7 - Ruth was merciful, and another showed her mercy.
Matthew 5:7-8New International Version (NIV)
7 Blessed are the merciful,
for they will be shown mercy.
8 Blessed are the pure in heart,
for they will see God.
for they will be shown mercy.
8 Blessed are the pure in heart,
for they will see God.
The first verse is pretty clear, but the second is a bit more cryptic. What does it mean to have a pure heart? What does it mean to see God? What if I'm not sure that my heart is pure, or at least all the way pure? Will I still get to see God?
The phrase about a 'pure heart' can be found a few others places in Psalms, but the most well-known place is in Psalm 51 - the psalm of contrition that David prayed after realizing the extent of his sin around the affair with Bathsheba. David prayed for God to "create in me a pure heart."
David's 'pure heart' was not dependent on his ability to be pure; it depended on God's ability to make David's heart pure. It's God's work in us, not our innate pureness. For that mater, our ability to be merciful is also dependent on God working in us to soften our hearts and to help us be merciful to those around us, especially those who don't appear to deserve mercy. God works in you to share mercy with others, and chances are that through those experiences, you will see God!