Yeggeps
Yeggeps

Reputation: 2105

Ruby 1.9.3 syntax for block as argument

So in Ruby 1.9.2-p290 I can do this

content_for :something, do    
end

which is quite nice. But that's a syntax error in Ruby 1.9.3-p125 and instead I need to do this

content_for(:something) do
end

Where can I find documentation about this syntax restriction? Is there any other way it could be written in 1.9.3-p125?

Upvotes: 1

Views: 254

Answers (1)

Dmitry
Dmitry

Reputation: 3665

Just remove the comma:

content_for :something do    
end

Upvotes: 3

Related Questions