diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 505263ce..8abd0efb 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ '2.5', '2.6', '2.7', '3.0', 'ruby-head', 'jruby-9.2', 'jruby-head' ] + ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1', 'ruby-head', 'jruby-9.2', 'jruby-9.3', 'jruby-head' ] steps: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7.1 + ruby-version: 3.1.3 - name: Test performance and accuracy run: | gem install bundler diff --git a/evaluation/dictionary_generator.rb b/evaluation/dictionary_generator.rb index 150765fd..d7bd79f8 100644 --- a/evaluation/dictionary_generator.rb +++ b/evaluation/dictionary_generator.rb @@ -14,7 +14,7 @@ puts ("downloading page %2d: " % num) + url - body = open(url).read + body = URI.open(url).read json = JSON.load(body) count = json["query"]["allpages"].size apfrom = CGI.escape(json["query"]["allpages"].last['title']) if count > 0