1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Use File#open instead of Kernel#open

https://github.com/rubygems/rubygems/commit/bfb3f67494
This commit is contained in:
bronzdoc 2019-07-16 18:50:36 -06:00 committed by Hiroshi SHIBATA
parent 41dd9f7e67
commit 1eaacb1ef5
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -113,8 +113,7 @@ class Gem::StubSpecification < Gem::BasicSpecification
begin
saved_lineno = $.
# TODO It should be use `File.open`, but bundler-1.16.1 example expects Kernel#open.
open loaded_from, OPEN_MODE do |file|
File.open loaded_from, OPEN_MODE do |file|
begin
file.readline # discard encoding line
stubline = file.readline.chomp