From: Nasir Khan Date: 2007-06-10T05:01:40+09:00 Subject: bug in facets 1.8.54 ------=_Part_92795_3003369.1181419300876 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline There seems to be a bug in facets PQueue v1.8.54, at least the behavior is inconsistent. Here is the output on machine-1 which is running - --------------------------------------------------------- ruby 1.8.5 (2006-08-25) [i386-mswin32] facets (1.8.51, 1.8.8) irb(main):001:0> require 'facets/more/pqueue' => true irb(main):002:0> pqueue = PQueue.new(lambda{|x,y| x #, @size=0, @qarray=[n irb(main):003:0> irb(main):004:0* pqueue.top => nil --------------------------------------------- This is the expected behavior While on another machine with - ----------------------------------------- ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] facets (1.8.54) irb(main):001:0> require 'facets/more/pqueue' => true irb(main):002:0> @pqueue = PQueue.new(lambda{|x,y| x > irb(main):003:0> @pqueue.top => # --------------------------------------------- Strangely the lambda supplied as the comparator is inserted in the queue. Both Ruby and Facets version is different. TIA - nasir ------=_Part_92795_3003369.1181419300876--