Skip to content

simple-random 1.0.6

Latest

Choose a tag to compare

@ealdent ealdent released this 16 Nov 11:56

Patch release containing the fixes from #9.

  • Prevent gamma sampling hangs for non-finite shapes and fixed-point seeds.
  • Keep uniform samples inside their documented open interval, including narrow bounds and wide intervals whose intermediate arithmetic overflows.
  • Raise ArgumentError when bounds contain no representable interior float.
  • Allow generators from finished threads to be collected while preserving sharing across fibers within a thread and isolation by subclass.
  • Explain that these generators are unsuitable for security-sensitive randomness and recommend Ruby's SecureRandom.

No public methods or parameters were added. Finite samples already inside their requested bounds retain their existing seeded results.

Validation: 40 tests and 40,207 assertions passed locally; the built gem passed an isolated installation and regression smoke check.

Release CI passed tests and gem builds on Ruby 2.6 and 3.0 through 3.4.