From: Jacob Fugal Date: 2008-10-31T23:17:47+09:00 Subject: [ruby-core:19663] Re: Odd TypeError in inject (1.9.1 preview 1) ------=_Part_33156_23695510.1225462724899 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Fri, Oct 31, 2008 at 5:20 AM, David A. Black wrote: > Hi -- > > I think this should return 0. Anything I'm missing? > > RUBY_DESCRIPTION >>> >> => "ruby 1.9.1 (2008-10-28 revision 19983) [i386-darwin9.5.0]" > >> [].inject(0) >>> >> TypeError: 0 is not a symbol > from (irb):4:in `inject' > from (irb):4 > from /usr/local/bin/irb19:12:in `
' Seems to me it's trying to treat 0 as a symbol-to-procable block parameter, then failing during the symbol-to-proc conversion. Still a bug, though, IMO. Jacob Fugal ------=_Part_33156_23695510.1225462724899 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Fri, Oct 31, 2008 at 5:20 AM, David A. Black <dblack@rubypal.com> wrote:
Hi --

I think this should return 0. Anything I'm missing?

RUBY_DESCRIPTION
=> "ruby 1.9.1 (2008-10-28 revision 19983) [i386-darwin9.5.0]"
[].inject(0)
TypeError: 0 is not a symbol
       from (irb):4:in `inject'
       from (irb):4
       from /usr/local/bin/irb19:12:in `<main>'


Seems to me it's trying to treat 0 as a symbol-to-procable block parameter, then failing during the symbol-to-proc conversion. Still a bug, though, IMO.

Jacob Fugal
------=_Part_33156_23695510.1225462724899--