From: Trans Date: 2007-07-28T04:34:01+09:00 Subject: Re: Facets error while using Time.parse On Jul 27, 10:40 am, "mer...@gmail.com" wrote: > I have install latest facets using gem. I am having this issue with > Time.parse with facets. Any ideas? > > [spatel@taamserver ~]$ ruby --version > ruby 1.8.6 (2007-06-07 patchlevel 36) [i686-linux] > > Everything is fine here: > > [spatel@taamserver ~]$ cat x1.rb > #require 'facets' > p Time.parse("3:40:40") > p Time.parse('4:41:41') > p Time.parse('5:42:42') > [spatel@taamserver ~]$ ruby x1.rb > Fri Jul 27 03:40:40 -0500 2007 > Fri Jul 27 04:41:41 -0500 2007 > Fri Jul 27 05:42:42 -0500 2007 > > Same program with first line uncommented > > [spatel@taamserver ~]$ cat x1.rb > require 'facets' > p Time.parse("3:40:40") > p Time.parse('4:41:41') > p Time.parse('5:42:42') > [spatel@taamserver ~]$ ruby x1.rb > Fri Jul 27 03:40:40 -0500 2007 > Fri Jul 27 13:24:55 -0500 2007 > Fri Jul 27 13:24:55 -0500 2007 Want to see the culprit? Would you believe I tracked it to this: class Symbol # Same functionality as before, just a touch more efficient. def to_s @to_s || (@to_s = id2name) end end I'm not sure how exactly that could break anything. But somehow it does. Anyone? A quick fix, remark out the line in lib/facets.rb (in facets' gem dir): #require 'facets/core/symbol/to_s' T.