Skip to content

Commit

Permalink
We no longer support 1.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshCheek committed Nov 11, 2016
1 parent 6289417 commit 6ffd6c3
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/seeing_is_believing/event_stream/consumer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,7 @@ def self.fix_encoding(str)
rescue EncodingError
str = str.force_encoding(Encoding::UTF_8)
end
return str.scrub('�') if str.respond_to? :scrub
# basically reimplement scrub, b/c it's not implemented on 1.9.3
str.each_char.inject("") do |new_str, char|
if char.valid_encoding?
new_str << char
else
new_str << '�'
end
end
str.scrub '�'
end

def initialize(streams)
Expand Down

0 comments on commit 6ffd6c3

Please sign in to comment.