On Feb 19, 2012, at 13:49 , Hal Fulton wrote:

> I admit I still use 1.8.x more often than 1.9.x -- and I keep running =
across
> little things that puzzle or annoy me.
>=20
> Why is it that this statement:
>=20
>   value =3D                                                            =
                                                     =20
>     if block_given?                                                    =
                                                   =20
>       yield str                                                        =
                                                   =20
>     else                                                               =
                                                   =20
>       str.send(converter)                                              =
                                                   =20
>     end                                                                =
                   =20
>=20
> cannot be rewritten as:
>=20
>   value =3D block_given? ? yield str : str.send(converter)


Doesn't look like a 1.8 vs 1.9 issue:

% ruby -vwe 'def x str; value =3D block_given? ? yield str : =
str.send(converter); end'
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
-e:1: syntax error, unexpected tIDENTIFIER
def x str; value =3D block_given? ? yield str : str.send(converter); end
                                           ^

All versions of ruby that I test against want `yield(str)`.