-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
The problem is here:
https://github.com/jruby/jruby/blob/master/lib/ruby/stdlib/securerandom.rb#L147
At some point, the code to handle ranges was removed.
Environment
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.121-b13 on 1.8.0_121-b13 +jit [mswin32-x86_64]
Windows 10 Professional x64
Expected Behavior
In standard Ruby I can do puts SecureRandom.random_number(50..55) and get a random result between 50 and 55.
Actual Behavior
If I do this in JRuby, I get an argument error for using a Range in place of a Fixnum.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels