ruby giving output without print statement -


this piece of code in ruby giving output eventhough not using print/puts.please me figure out why

def display_something     p yield end  display_something {"say something"} 

when call display_someting, using print method (p) on yield. means when pass "say something" display_something method, printing string.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -