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
Post a Comment