Skip to content

Commit 6cee8d7

Browse files
committed
Support newer rubies
1 parent cc50837 commit 6cee8d7

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

tools/fuzz.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
require 'json'
22

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-
113
class Fuzzer
124
def initialize(n, freqs = {})
135
sum = freqs.inject(0.0) { |s, x| s + x.last }
@@ -25,7 +17,7 @@ def initialize(n, freqs = {})
2517
def random_string
2618
s = ''
2719
30.times { s << @alpha[rand(@alpha.size)] }
28-
s.to_utf8
20+
s
2921
end
3022

3123
def pick

0 commit comments

Comments
 (0)