Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
run: |
::- Set up VC ${{ matrix.vc }}
set | sort > old.env
set | coreutils sort > old.env
call ..\src\win32\vssetup.cmd ^
-arch=${{ matrix.target || 'amd64' }} ^
${{ matrix.vcvars && '-vcvars_ver=' || '' }}${{ matrix.vcvars }}
Expand All @@ -124,8 +124,8 @@ jobs:
set MAKEFLAGS=l
set /a TEST_JOBS=(15 * %NUMBER_OF_PROCESSORS% / 10) > nul
set RUBY_OPT_DIR=%GITHUB_WORKSPACE:\=/%/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET%
set | sort > new.env
comm -13 old.env new.env >> %GITHUB_ENV%
set | coreutils sort > new.env
coreutils comm -13 old.env new.env >> %GITHUB_ENV%
del *.env

- name: baseruby version
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ releases.
* strscan 3.1.7.dev
* 3.1.6 to [v3.1.7][strscan-v3.1.7]
* syntax_suggest 2.0.3
* timeout 0.6.1
* zlib 3.2.3
* 3.2.2 to [v3.2.3][zlib-v3.2.3]

Expand Down
6 changes: 4 additions & 2 deletions doc/strscan/methods/skip_until.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ call-seq:
skip_until(pattern) -> matched_substring_size or nil

Attempts to [match][17] the given `pattern`
anywhere (at any [position][2]) in the [target substring][3];
does not modify the positions.
anywhere (at any [position][2]) in the [target substring][3].

If the match attempt succeeds:

- Sets [match values][9].
- Sets the [byte position][2] to the end of the matched substring;
may adjust the [character position][7].
- Returns the size of the matched substring.

```rb
Expand Down Expand Up @@ -42,6 +43,7 @@ If the match attempt fails:

- Clears match values.
- Returns `nil`.
- Does not update positions.

```rb
scanner.skip_until(/nope/) # => nil
Expand Down
10 changes: 5 additions & 5 deletions lib/rubygems/resolver/api_set.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# frozen_string_literal: true

##
# The global rubygems pool, available via the rubygems.org API.
# The global rubygems pool, available via the Compact Index API.
# Returns instances of APISpecification.

class Gem::Resolver::APISet < Gem::Resolver::Set
autoload :GemParser, File.expand_path("api_set/gem_parser", __dir__)

##
# The URI for the dependency API this APISet uses.
# The URI for the Compact Index API this APISet uses.

attr_reader :dep_uri # :nodoc:

Expand All @@ -23,9 +23,9 @@ class Gem::Resolver::APISet < Gem::Resolver::Set
attr_reader :uri

##
# Creates a new APISet that will retrieve gems from +uri+ using the RubyGems
# API URL +dep_uri+ which is described at
# https://guides.rubygems.org/rubygems-org-api
# Creates a new APISet that will retrieve gems from +uri+ using the Compact
# Index API URL +dep_uri+ which is described at
# https://guides.rubygems.org/rubygems-org-compact-index-api

def initialize(dep_uri = "https://index.rubygems.org/info/")
super()
Expand Down
6 changes: 3 additions & 3 deletions lib/rubygems/resolver/api_specification.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

##
# Represents a specification retrieved via the rubygems.org API.
# Represents a specification retrieved via the Compact Index API.
#
# This is used to avoid loading the full Specification object when all we need
# is the name, version, and dependencies.
Expand All @@ -19,10 +19,10 @@ def self.new(set, api_data)
end

##
# Creates an APISpecification for the given +set+ from the rubygems.org
# Creates an APISpecification for the given +set+ from the Compact Index API
# +api_data+.
#
# See https://guides.rubygems.org/rubygems-org-api/#misc-methods for the
# See https://guides.rubygems.org/rubygems-org-compact-index-api for the
# format of the +api_data+.

def initialize(set, api_data)
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# A Source knows how to list and fetch gems from a RubyGems marshal index.
#
# There are other Source subclasses for installed gems, local gems, the
# bundler dependency API and so-forth.
# Compact Index API and so-forth.

class Gem::Source
include Comparable
Expand Down
10 changes: 9 additions & 1 deletion lib/rubygems/yaml_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,15 @@ def coerce(val)
val = val.sub(/^! /, "") if val.start_with?("! ")

if val =~ /^"(.*)"$/
$1.gsub(/\\"/, '"').gsub(/\\n/, "\n").gsub(/\\r/, "\r").gsub(/\\t/, "\t").gsub(/\\\\/, "\\")
$1.gsub(/\\["nrt\\]/) do |m|
case m
when '\\"' then '"'
when "\\n" then "\n"
when "\\r" then "\r"
when "\\t" then "\t"
when "\\\\" then "\\"
end
end
elsif val =~ /^'(.*)'$/
$1.gsub(/''/, "'")
elsif val == "true"
Expand Down
2 changes: 1 addition & 1 deletion lib/timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

module Timeout
# The version
VERSION = "0.6.0"
VERSION = "0.6.1"

# Internal exception raised to when a timeout is triggered.
class ExitException < Exception
Expand Down
Loading