Comments on: Memo #5: Use ary.uniq method carefully in Ruby https://kpumuk.info/ruby-on-rails/memo-5-use-ary-uniq-method-carefully-in-ruby/ In my blog I'll try to describe about interesting technologies, my discovery in IT and some useful things about programming. Wed, 30 Sep 2009 17:12:32 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: roger rubygems https://kpumuk.info/ruby-on-rails/memo-5-use-ary-uniq-method-carefully-in-ruby/comment-page-1/#comment-283328 Wed, 30 Sep 2009 17:12:32 +0000 http://kpumuk.info/?p=721#comment-283328 So was this fixed for 1.8.7 at some point then? [between p72 and p174]?

]]>
By: FX Poster https://kpumuk.info/ruby-on-rails/memo-5-use-ary-uniq-method-carefully-in-ruby/comment-page-1/#comment-282249 Thu, 16 Jul 2009 11:39:51 +0000 http://kpumuk.info/?p=721#comment-282249 Ubuntu 9.04 have Ruby 1.8.7-p72, and this “bug” is still there :)

]]>
By: pete https://kpumuk.info/ruby-on-rails/memo-5-use-ary-uniq-method-carefully-in-ruby/comment-page-1/#comment-282241 Wed, 15 Jul 2009 15:14:36 +0000 http://kpumuk.info/?p=721#comment-282241 The good news is, it looks like this was fixed in 1.8.7 and 1.9.

I slightly modified your script:

1
2
3
p [{"id"=>667824693}, {"id"=>667824693}].uniq
p [{"id"=>66782469}, {"id"=>66782469}].uniq
p [{"id"=>6678246931}, {"id"=>6678246931}].uniq

And ran it with multiruby:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
phiggins@lihnucks ~ $ multiruby example.rb

VERSION = 1.8.7-p174
CMD     = ~/.multiruby/install/1.8.7-p174/bin/ruby example.rb

[{"id"=>667824693}]
[{"id"=>66782469}]
[{"id"=>6678246931}]

RESULT = 0

VERSION = 1.8.6-p369
CMD     = ~/.multiruby/install/1.8.6-p369/bin/ruby example.rb

[{"id"=>667824693}, {"id"=>667824693}]
[{"id"=>66782469}, {"id"=>66782469}]
[{"id"=>6678246931}, {"id"=>6678246931}]

RESULT = 0

VERSION = 1.9.1-p129
CMD     = ~/.multiruby/install/1.9.1-p129/bin/ruby example.rb

[{"id"=>667824693}]
[{"id"=>66782469}]
[{"id"=>6678246931}]

RESULT = 0

TOTAL RESULT = 0 failures out of 3

Passed: 1.9.1-p129, 1.8.6-p369, 1.8.7-p174
Failed:
]]>
By: FX Poster https://kpumuk.info/ruby-on-rails/memo-5-use-ary-uniq-method-carefully-in-ruby/comment-page-1/#comment-282239 Wed, 15 Jul 2009 11:57:50 +0000 http://kpumuk.info/?p=721#comment-282239 Эх, теперь мне прийдется имплементить свой uniq-метод. Но за обьяснения спасибо. :)

]]>