News for hackers. Stuff that matters.
Re:Ruby Bug: SecureRandom should try /dev/urandom first by goldbrick on Wednesday May 04, 2016 @10:18AM (#11628510)
Why not just make the argument default to 16? Is something non-obvious going on?
Re:Ruby Bug: SecureRandom should try /dev/urandom first by infraruby on Wednesday May 04, 2016 @10:32AM (#11628608)
The caller may pass nil explicitly.
Re:Ruby Bug: SecureRandom should try /dev/urandom first by goldbrick on Wednesday May 04, 2016 @12:57PM (#11629698)
I don't understand. You may still pass nil explicitly if the argument defaults to 16?
Re:Ruby Bug: SecureRandom should try /dev/urandom first by infraruby on Wednesday May 04, 2016 @03:22PM (#11630966)
Yes:

  def f(n = 16)
    n
  end

  p f # => 16
  p f(nil) # => nil