Confusion over {} and do...end for blocks ... posted by Kedar Mhaswade @ Wed,...
Dave, Thank you for Programming Ruby book. I love reading it. One quick question as I was playing with lambdas: I thought that {} and do… end equivalent for blocks. But apparently, Ruby 1.9.2 does not...
View ArticleConfusion over {} and do...end for blocks ... posted by Stefano Mioli @ Sun,...
Braces and do…end have a different precedence when it comes to binding. Specifically, braces bind more tightly than do…end.Call my_while() with a couple of round brackets and it will work just fine.
View Article
More Pages to Explore .....