jbodah/suggest_rb

Array#sample produces an inconsistent result

spilist opened this issue · 2 comments

I don't think it is a big problem considering the purpose of this gem, but I assume this would also happen to other methods that return random results.

If this is an intended or expected behavior, adding some words to README would be enough. What do you think? (BTW, thanks for this awesome idea and work.)

2.4.3 :001 > require 'suggest'
 => true
2.4.3 :002 > [0, 1, 2, 3].what_returns? 1
 => [:sample]
2.4.3 :003 > [0, 1, 2, 3].what_returns? 1
 => []
2.4.3 :004 > [0, 1, 2, 3].what_returns? 1
 => [:sample]
2.4.3 :005 > [0, 1, 2, 3].what_returns? 1
 => []
2.4.3 :006 > [0, 1, 2, 3].what_returns? 1
 => []

Ah, I hadn't considered these; will add this and other random methods (rand, shuffle, maybe more) to the skipped methods

Fixed in 0.2.0, thanks!