We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc50837 commit 6cee8d7Copy full SHA for 6cee8d7
1 file changed
tools/fuzz.rb
@@ -1,13 +1,5 @@
1
require 'json'
2
3
-require 'iconv'
4
-ISO_8859_1_TO_UTF8 = Iconv.new('utf-8', 'iso-8859-15')
5
-class ::String
6
- def to_utf8
7
- ISO_8859_1_TO_UTF8.iconv self
8
- end
9
-end
10
-
11
class Fuzzer
12
def initialize(n, freqs = {})
13
sum = freqs.inject(0.0) { |s, x| s + x.last }
@@ -25,7 +17,7 @@ def initialize(n, freqs = {})
25
17
def random_string
26
18
s = ''
27
19
30.times { s << @alpha[rand(@alpha.size)] }
28
- s.to_utf8
20
+ s
29
21
end
30
22
31
23
def pick
0 commit comments