Dots or arrows? Dots or arrows? See, he said he was leaving for RubyConf and on the way he’d figure out this whole dots and arrows business. Currently, arrows are winning, since they’re checked into 1.9.
>> 1.times -> (foo="bar") { puts foo }
=> 0
>> def y
>> yield
>> end
>> y -> (foo="bar") { puts foo }
The two dotted suggestions (err.. one one-dotted and one two-dotted!) come from Christophe Grandsire, who suggests a colon, and Eric Mahurin, who offers a period (which semantically jives with method calling):
I don’t envy the Yacc’ry ahead for Nobu and Matz. But it’s fun to see everyone’s ears go up when the syntactical frosting comes out. Even when it’s only a couple sprinkles.