What wrong?

I have this problem only if I run Rails by mongrel_cluster.

./script/server works fine.

As I remember u can not use lambda do do |abc |
end
U must use : lambda {| abc| }

As I remember u can not use lambda do do |abc |

end

U must use : lambda {| abc| }

lambda do |abc|

end

is equivalent to

lambda { |abc| … }

Thus, they are both legal in Ruby 1.8 and 1.9.

-Conrad

> As I remember u can not use lambda do do |abc |
> end
> U must use : lambda {| abc| }

lambda do |abc|
...
end

is equivalent to

lambda { |abc| ... }

Thus, they are both legal in Ruby 1.8 and 1.9.

{} binds more tightly than do..end so you do sometimes need to use ()
to disambiguate, eg

named_scope :foo, lambda { ... }

is ok

but

named_scope :foo, lambda do
...
end

isn't because ruby thinks that this block is for named_scope, not
lambda.

named_scope(:foo, lambda do
...
end)

makes it clear to ruby what to do.

Fred