pixiedust 0.0.6 → 0.0.7

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.
Files changed (2) hide show
  1. data/lib/pixiedust.rb +2 -21
  2. metadata +1 -1
@@ -5,7 +5,7 @@ rescue LoadError
5
5
  end
6
6
 
7
7
  class PixieDust
8
- VERSION = '0.0.6'
8
+ VERSION = '0.0.7'
9
9
  end
10
10
 
11
11
  class Object
@@ -35,25 +35,6 @@ class RandomDust
35
35
  return bytes
36
36
  end
37
37
 
38
- =begin
39
- uint32s = bytes_allocated / 4
40
- delta = 2**(8*val.size) - val # diff between num of uint32s and bytes needed
41
-
42
- if delta >= 2**56 && delta < 2**64 then bytes_needed -= 7; unp="C"
43
- elsif delta >= 2**48 && delta < 2**56 then bytes_needed -= 6; unp="S"
44
- elsif delta >= 2**40 && delta < 2**48 then bytes_needed -= 5; unp="SC"
45
- elsif delta >= 2**32 && delta < 2**40 then bytes_needed -= 4; unp="L"
46
- #else unp=""
47
- #end
48
- #if delta >= 2**24 && delta < 2**32 then bytes_needed -= 3; unp="C"
49
- elsif delta >= 2**24 && delta < 2**32 then bytes_needed -= 3; unp="C"
50
- elsif delta >= 2**16 && delta < 2**24 then bytes_needed -= 2; unp="S"
51
- elsif delta >= 2**8 && range < 2**16 then bytes_needed -= 1; unp="SC"
52
- else unp=""
53
- end
54
- puts "delta is #{delta}, unp is #{unp}"
55
- =end
56
-
57
38
  def RandomDust.between(min, max)
58
39
  if min == max then raise "min == max in RandomDust.between"; end
59
40
  if min > max then raise "min > max in RandomDust.between"; end
@@ -107,7 +88,7 @@ class RandomDust
107
88
  value += min
108
89
 
109
90
  unless value < min || value > max
110
- open('pixiedust-attempts.txt', "a+") { |f| f << "#{attempts} needed (#{min}-#{max} range\n" }
91
+ #open('pixiedust-attempts.txt', "a+") { |f| f << "#{attempts} needed (#{min}-#{max} range\n" }
111
92
  return value
112
93
  end
113
94
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixiedust
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Wilkins