Update has_ancestry.rb

used the lambda keyword instead of stabby lambda in order to keep compatibility with older versions