diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-01-11 20:11:20 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-01-20 06:45:28 +0900 |
commit | 2b7025e680eb29f936538c07f057f590003e45bf (patch) | |
tree | 2e267df62c2dc38be325487cfe3f4a4d63b93cc5 /lib/rubygems | |
parent | ec5bde1a8034608939ee649ca8ad4c39f9f52956 (diff) |
[rubygems/rubygems] Rename `Gem.open_with_flock` to `Gem.open_file`
Since it only uses `flock` on Windows.
https://github.com/rubygems/rubygems/commit/b877de4d9c
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/specification.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/stub_specification.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 06e50244a7..43ab917d19 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1115,7 +1115,7 @@ class Gem::Specification < Gem::BasicSpecification file = file.dup.tap(&Gem::UNTAINT) return unless File.file?(file) - code = Gem.open_with_flock(file, 'r:UTF-8:-', &:read) + code = Gem.open_file(file, 'r:UTF-8:-', &:read) code.tap(&Gem::UNTAINT) diff --git a/lib/rubygems/stub_specification.rb b/lib/rubygems/stub_specification.rb index 1f2dbbc2e2..b1dd7397ae 100644 --- a/lib/rubygems/stub_specification.rb +++ b/lib/rubygems/stub_specification.rb @@ -110,7 +110,7 @@ class Gem::StubSpecification < Gem::BasicSpecification begin saved_lineno = $. - Gem.open_with_flock loaded_from, OPEN_MODE do |file| + Gem.open_file loaded_from, OPEN_MODE do |file| begin file.readline # discard encoding line stubline = file.readline.chomp |