diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 1d00469..16c65f8 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.7'] + ruby-version: ['2.7', '3.3'] steps: - uses: actions/checkout@v2 diff --git a/lib/readability.rb b/lib/readability.rb index 4e4309f..2279517 100644 --- a/lib/readability.rb +++ b/lib/readability.rb @@ -43,7 +43,7 @@ def initialize(input, options = {}) @options = DEFAULT_OPTIONS.merge(options) @input = input - if RUBY_VERSION =~ /^(1\.9|2)/ && !@options[:encoding] + if RUBY_VERSION =~ /^(1\.9|2|3)/ && !@options[:encoding] @input = GuessHtmlEncoding.encode(@input, @options[:html_headers]) unless @options[:do_not_guess_encoding] @options[:encoding] = @input.encoding.to_s end