Hi --

On Fri, 28 Jul 2006, Daniel Schierbeck wrote:

> I have no problem doing this:
>
>  if foo :bar then
>    ...
>  end
>
> Yet when I do this:
>
>  case "foo"
>    when bar :baz then "bur"
>  end
>
> I get the following syntax error:
>
>  SyntaxError: compile error
>  (irb):30: parse error, unexpected tSYMBEG, expecting kDO or '{' or '('
>    when bar :baz then "bur"

I guess when binds more tightly than a parentheses-less method call.
You could do:

   when bar(:baz) ...


David

-- 
http://www.rubypowerandlight.com => Ruby/Rails training & consultancy
http://www.manning.com/black     => RUBY FOR RAILS (reviewed on
                                     Slashdot, 7/12/2006!)
http://dablog.rubypal.com        => D[avid ]A[. ]B[lack's][ Web]log
dblack / wobblini.net              => me