super_random 3.2.230116 → 3.2.230118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/super_random.rb +2 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dda98111d66106fe2b2e3027f1b44c61abe791064a5a39c25d82994023670cf
|
4
|
+
data.tar.gz: b9b3617b187dd8c3197e4069b0fd18600b9cd9975c64914df65f85bdb8a72b4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17627105179fdf958736dddb2c05f85d3fab8573797c10a9777dd23aacf306ea8692aaf6a202c2bfd05a9cc53df313ad6a50d4141a57b80063e74696a5cc3a85
|
7
|
+
data.tar.gz: 116b6e7d203bde17193088afbe2badf0dcf74a71a4b6fd1cf72f3462a4d66e598465f0551d078227ede39bace27c98187a83c6dab778cf3ba30bcdabba7be0ee
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# SuperRandom
|
2
2
|
|
3
|
-
* [VERSION 3.2.
|
3
|
+
* [VERSION 3.2.230118](https://github.com/carlosjhr64/super_random/releases)
|
4
4
|
* [github](https://github.com/carlosjhr64/super_random)
|
5
5
|
* [rubygems](https://rubygems.org/gems/super_random)
|
6
6
|
|
@@ -17,7 +17,7 @@ You can't get more random than random, but you can try really, really, really ha
|
|
17
17
|
## SYNOPSIS:
|
18
18
|
```ruby
|
19
19
|
require 'super_random'
|
20
|
-
SuperRandom::VERSION #=> "3.2.
|
20
|
+
SuperRandom::VERSION #=> "3.2.230118"
|
21
21
|
SuperRandom::DEFAULT_SOURCES #~> www.random.org
|
22
22
|
super_random = SuperRandom.new
|
23
23
|
super_random.sources #~> www.random.org
|
data/lib/super_random.rb
CHANGED
@@ -6,7 +6,7 @@ require 'digest'
|
|
6
6
|
#`ruby`
|
7
7
|
|
8
8
|
class SuperRandom
|
9
|
-
VERSION = '3.2.
|
9
|
+
VERSION = '3.2.230118'
|
10
10
|
DEFAULT_SOURCES = [
|
11
11
|
'https://www.random.org/strings/?num=10&len=20&digits=on&upperalpha=on&loweralpha=on&unique=on&format=plain&rnd=new',
|
12
12
|
]
|
@@ -60,11 +60,7 @@ class SuperRandom
|
|
60
60
|
# An alternate way to generate a float...
|
61
61
|
x,y = xy
|
62
62
|
# ...but what distribution is this?
|
63
|
-
Rational(x,y).to_f
|
64
|
-
rescue ZeroDivisionError
|
65
|
-
# Fat chance!
|
66
|
-
return 0 if x == 0
|
67
|
-
1.0/0.0
|
63
|
+
Rational(x+1,y+1).to_f
|
68
64
|
end
|
69
65
|
|
70
66
|
def random_number(scale=1.0)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: super_random
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.230118
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CarlosJHR64
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
You can't get more random than random, but you can try really, really, really hard.
|