First page Back Continue Last page Overview Graphics
More on closures / blocks
- Initially unfamiliar, but now very useful
- Some methods take an optional block, changing their functionality in interesting ways
'techno'.sub(/[aeiou]/, '*')
'techno'.sub(/.+/) {|s| s.upcase}