From a216e3db27eb867c598c964223cfabaf5625cfe2 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Tue, 11 Jun 2024 09:52:35 +0900 Subject: [PATCH] xxx --- .github/workflows/test.yml | 18 +++++++----------- lib/rexml/source.rb | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f593c1d1..2383d198 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,14 +3,14 @@ on: - push - pull_request jobs: - ruby-versions-inplace: + ruby-versions: uses: ruby/actions/.github/workflows/ruby_versions.yml@master with: engine: cruby-jruby min_version: 2.5 inplace: - needs: ruby-versions-inplace + needs: ruby-versions name: "Inplace: ${{ matrix.ruby-version }} on ${{ matrix.runs-on }}" runs-on: ${{ matrix.runs-on }} strategy: @@ -20,7 +20,7 @@ jobs: - ubuntu-latest - macos-latest - windows-latest - ruby-version: ${{ fromJson(needs.ruby-versions-inplace.outputs.versions) }} + ruby-version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} exclude: - {runs-on: macos-latest, ruby-version: 2.5} # include: @@ -47,14 +47,8 @@ jobs: - name: Test run: bundle exec rake test RUBYOPT="--enable-frozen-string-literal" - ruby-versions-gem: - uses: ruby/actions/.github/workflows/ruby_versions.yml@master - with: - engine: cruby-jruby - min_version: 3.0 - gem: - needs: ruby-versions-gem + needs: ruby-versions name: "Gem: ${{ matrix.ruby-version }} on ${{ matrix.runs-on }}" runs-on: ${{ matrix.runs-on }} strategy: @@ -64,7 +58,9 @@ jobs: - ubuntu-latest - macos-latest - windows-latest - ruby-version: ${{ fromJson(needs.ruby-versions-gem.outputs.versions) }} + exclude: + - {runs-on: macos-latest, ruby-version: 2.5} + ruby-version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 diff --git a/lib/rexml/source.rb b/lib/rexml/source.rb index 982aa84a..67154832 100644 --- a/lib/rexml/source.rb +++ b/lib/rexml/source.rb @@ -1,8 +1,28 @@ # coding: US-ASCII # frozen_string_literal: false + +require "strscan" + require_relative 'encoding' module REXML + if StringScanner::Version < "1.0.0" + module StringScannerCheckScanString + refine StringScanner do + def check(pattern) + pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String) + super(pattern) + end + + def scan(pattern) + pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String) + super(pattern) + end + end + end + using StringScannerCheckScanString + end + # Generates Source-s. USE THIS CLASS. class SourceFactory # Generates a Source object pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy