Backport #8910

Please backport r42542 (random.c `rb_random_ulong_limited`: coerce before check negative)

Added by Kenichi Kamiya over 1 year ago. Updated over 1 year ago.

[ruby-core:57196]
Status:Closed
Priority:Low
Assignee:Tomoyuki Chikanaga

Description

r42542

rb_random_ulong_limited should coerce returned value before check
negative for fixes Array#sample, Array#shuffle.

Associated revisions

Revision 43079
Added by Tomoyuki Chikanaga over 1 year ago

merge revision(s) 42542: [Backport #8910]

* random.c (rb_random_ulong_limited): coerce before check negative.
  [Fixes GH-379]

History

#1 Updated by Tomoyuki Chikanaga over 1 year ago

  • Status changed from Open to Assigned

#2 Updated by Tomoyuki Chikanaga over 1 year ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r43079.
Kenichi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 42542: [Backport #8910]

* random.c (rb_random_ulong_limited): coerce before check negative.
  [Fixes GH-379]

Also available in: Atom PDF