aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems
Commit message (Collapse)AuthorAgeFilesLines
* Fix a typoKazuhiro NISHIYAMA2019-11-131-1/+1
|
* Only enabled mon_owned condition with Ruby 2.5+Hiroshi SHIBATA2019-11-121-4/+8
|
* check more.Koichi Sasada2019-11-121-2/+2
|
* Monitor owner state check correctly.Koichi Sasada2019-11-121-1/+2
| | | | Monitor can be owned at the beginning of this method.
* Revert "Use untaint for File.symlink in kernel_require.rb"Yusuke Endoh2019-11-121-4/+1
| | | | | | | This reverts commit d9978ce5d397866afae536db2aa708af3b7a4b2f. Untaint was tentatively restored due to test failures. But now, the failed tests have been removed, so we can revert the tentative fix.
* Use untaint for File.symlink in kernel_require.rbHiroshi SHIBATA2019-11-121-1/+4
| | | | Partly reverted 7d463e360b9c4718b17378eb52783116a01b884b
* release RUBYGEMS_ACTIVATION_MONITOR correctly.Koichi Sasada2019-11-121-2/+10
| | | | | | `File.symlink? safe_lp` can raise SecurityError and raising an exception can leave RUBYGEMS_ACTIVATION_MONITOR locking. This patch release it correctly.
* more messagesKoichi Sasada2019-11-121-1/+1
|
* check monitor is owning for debugKoichi Sasada2019-11-121-0/+5
|
* Revert "Try to revert the test failure with Ruby CI"Hiroshi SHIBATA2019-11-111-3/+7
| | | | This reverts commit 8b27c23b5d55bd707a89bb5d95d2bdba9e132c1a.
* Try to revert the test failure with Ruby CIHiroshi SHIBATA2019-11-111-7/+3
| | | | https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian9/ruby-master/log/20191111T093005Z.fail.html.gz
* Merge RubyGems 3.1.0.pre3Hiroshi SHIBATA2019-11-1118-61/+68
| | | | | | | | | | | | | | | | | | | * Fix gem pristine not accounting for user installed gems. Pull request #2914 by Luis Sagastume. * Refactor keyword argument test for Ruby 2.7. Pull request #2947 by SHIBATA Hiroshi. * Fix errors at frozen Gem::Version. Pull request #2949 by Nobuyoshi Nakada. * Remove taint usage on Ruby 2.7+. Pull request #2951 by Jeremy Evans. * Check Manifest.txt is up to date. Pull request #2953 by David Rodríguez. * Clarify symlink conditionals in tests. Pull request #2962 by David Rodríguez. * Update command line parsing to work under ps. Pull request #2966 by David Rodríguez. * Properly test `Gem::Specifications.stub_for`. Pull request #2970 by David Rodríguez. * Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request #2985 by MSP-Greg.
* Remove unneeded exec bits from some filesDavid Rodríguez2019-11-092-0/+0
| | | | | | | | | | | | | I noticed that some files in rubygems were executable, and I could think of no reason why they should be. In general, I think ruby files should never have the executable bit set unless they include a shebang, so I run the following command over the whole repo: ```bash find . -name '*.rb' -type f -executable -exec bash -c 'grep -L "^#!" $1 || chmod -x $1' _ {} \; ```
* [rubygems/rubygems] Optimize Gem::Package::TarReader#eachJean Boussier2019-10-101-9/+15
| | | | https://github.com/rubygems/rubygems/commit/1de8f39ac4
* [rubygems/rubygems] Use dependency.identity in available_specsbronzdoc2019-10-051-12/+1
| | | | https://github.com/rubygems/rubygems/commit/bde88f00a1
* [rubygems/rubygems] Add Gem::Dependency#identity methodbronzdoc2019-10-051-0/+14
| | | | https://github.com/rubygems/rubygems/commit/05146bb2fd
* [rubygems/rubygems] Always pass an encoding option to Zlib::GzipReader.wrapNobuyoshi Nakada2019-10-051-5/+1
| | | | | | | | The arity of this method has been -1 since the import, so the option has been passed always, even if Zlib::GzipReader#initialize does not take the option. Actually it takes the option since 1.9. https://github.com/rubygems/rubygems/commit/2fcde0f4e0
* Gem::Specification#to_ruby needs OpenSSLNobuyoshi Nakada2019-09-261-0/+1
|
* [rubygems/rubygems] Make sure our modifications to kernel.warn workDavid Rodríguez2019-09-261-0/+1
| | | | | | And test the fix we're adding. https://github.com/rubygems/rubygems/commit/6f86637b98
* [rubygems/rubygems] Fix jruby buildDavid Rodríguez2019-09-261-1/+5
| | | | https://github.com/rubygems/rubygems/commit/cc255b774a
* [rubygems/rubygems] filter dependency type and name strictly.Hiroshi SHIBATA2019-09-261-1/+5
| | | | | | Co-authored-by: Yusuke Endoh <mame@ruby-lang.org> https://github.com/rubygems/rubygems/commit/92892bbc3a
* [rubygems/rubygems] Introduce default prerelease requirementDavid Rodríguez2019-09-263-3/+14
| | | | https://github.com/rubygems/rubygems/commit/506c5bce49
* [rubygems/rubygems] Remove comment not adding muchDavid Rodríguez2019-09-261-3/+0
| | | | https://github.com/rubygems/rubygems/commit/b3b5c2d379
* [rubygems/rubygems] add testsf2019-09-261-1/+1
| | | | https://github.com/rubygems/rubygems/commit/8a7e27381c
* [rubygems/rubygems] Detect libc version, closes #2918f2019-09-261-1/+1
| | | | https://github.com/rubygems/rubygems/commit/1d18b12a26
* [rubygems/rubygems] Fix underscore version for bundler itselfDavid Rodríguez2019-09-261-1/+1
| | | | | | Previously it wouldn't play nice with the bundler version finder. https://github.com/rubygems/rubygems/commit/d8bb81556d
* [rubygems/rubygems] Avoid adding OpenSSL::PKey::RSA instancesbronzdoc2019-09-261-4/+2
| | | | https://github.com/rubygems/rubygems/commit/ba021fb4be
* [rubygems/rubygems] Fix indentation in case statementbronzdoc2019-09-261-10/+10
| | | | https://github.com/rubygems/rubygems/commit/8ac0647659
* [rubygems/rubygems] Make ruby_code method handle OpenSSL::PKey::RSA objectsbronzdoc2019-09-261-0/+1
| | | | https://github.com/rubygems/rubygems/commit/b1d825ab3a
* [rubygems/rubygems] Set SOURCE_DATE_EPOCH env var if not provided.Ellen Marie Dash2019-09-263-6/+6
| | | | | | | | | | | | | Fixes #2290. 1. `Gem::Specification.date` returns SOURCE_DATE_EPOCH when defined, 2. this commit makes RubyGems set it _persistently_ when not provided. This combination means that you can build a gem, check the build time, and use that value to generate a new build -- and then verify they're the same. https://github.com/rubygems/rubygems/commit/d830d53f59
* [rubygems/rubygems] Add a gem attr to the Gem::Package class.Daniel Berger2019-09-261-0/+5
| | | | https://github.com/rubygems/rubygems/commit/5b81f364ae
* Make rb_scan_args handle keywords more similar to Ruby methods (#2460)Jeremy Evans2019-09-252-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cfuncs that use rb_scan_args with the : entry suffer similar keyword argument separation issues that Ruby methods suffer if the cfuncs accept optional or variable arguments. This makes the following changes to : handling. * Treats as **kw, prompting keyword argument separation warnings if called with a positional hash. * Do not look for an option hash if empty keywords are provided. For backwards compatibility, treat an empty keyword splat as a empty mandatory positional hash argument, but emit a a warning, as this behavior will be removed in Ruby 3. The argument number check needs to be moved lower so it can correctly handle an empty positional argument being added. * If the last argument is nil and it is necessary to treat it as an option hash in order to make sure all arguments are processed, continue to treat the last argument as the option hash. Emit a warning in this case, as this behavior will be removed in Ruby 3. * If splitting the keyword hash into two hashes, issue a warning, as we will not be splitting hashes in Ruby 3. * If the keyword argument is required to fill a mandatory positional argument, continue to do so, but emit a warning as this behavior will be going away in Ruby 3. * If keyword arguments are provided and the last argument is not a hash, that indicates something wrong. This can happen if a cfunc is calling rb_scan_args multiple times, and providing arguments that were not passed to it from Ruby. Callers need to switch to the new rb_scan_args_kw function, which allows passing of whether keywords were provided. This commit fixes all warnings caused by the changes above. It switches some function calls to *_kw versions with appropriate kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS is used. If creating new arguments, RB_PASS_KEYWORDS is used if the last argument is a hash to be treated as keywords. In open_key_args in io.c, use rb_scan_args_kw. In this case, the arguments provided come from another C function, not Ruby. The last argument may or may not be a hash, so we can't set keyword argument mode. However, if it is a hash, we don't want to warn when treating it as keywords. In Ruby files, make sure to appropriately use keyword splats or literal keywords when calling Cfuncs that now issue keyword argument separation warnings through rb_scan_args. Also, make sure not to pass nil in place of an option hash. Work around Kernel#warn warnings due to problems in the Rubygems override of the method. There is an open pull request to fix these issues in Rubygems, but part of the Rubygems tests for their override fail on ruby-head due to rb_scan_args not recognizing empty keyword splats, which this commit fixes. Implementation wise, adding rb_scan_args_kw is kind of a pain, because rb_scan_args takes a variable number of arguments. In order to not duplicate all the code, the function internals need to be split into two functions taking a va_list, and to avoid passing in a ton of arguments, a single struct argument is used to handle the variables previously local to the function.
* [rubygems/rubygems] Bump rubocop to 0.74.0 and fix new offensesDavid Rodríguez2019-09-057-16/+16
| | | | https://github.com/rubygems/rubygems/commit/d4fc383497
* [rubygems/rubygems] Minor fixAlexander Pakulov2019-09-051-1/+1
| | | | https://github.com/rubygems/rubygems/commit/95c1f4e179
* [rubygems/rubygems] Add missing parenthesesbronzdoc2019-09-051-1/+1
| | | | https://github.com/rubygems/rubygems/commit/f5972338e0
* [rubygems/rubygems] Remove unnecessary gem_name methodbronzdoc2019-09-051-5/+2
| | | | https://github.com/rubygems/rubygems/commit/d1bb122651
* [rubygems/rubygems] Error out if there are multiple gemspecs and no gemspec ↵bronzdoc2019-09-051-3/+10
| | | | | | is specified https://github.com/rubygems/rubygems/commit/547947bbf0
* [rubygems/rubygems] Build the first gemspec we found if no gemspec is specifiedbronzdoc2019-09-051-1/+9
| | | | https://github.com/rubygems/rubygems/commit/ab186266b7
* [rubygems/rubygems] Improve gemspec assignment and error messagebronzdoc2019-09-051-4/+2
| | | | https://github.com/rubygems/rubygems/commit/dc70c5a192
* [rubygems/rubygems] Make passing a gem name to be optionalbronzdoc2019-09-051-1/+1
| | | | https://github.com/rubygems/rubygems/commit/4ba4ffebbe
* [rubygems/rubygems] Move build gem logic to its own methodbronzdoc2019-09-051-7/+9
| | | | https://github.com/rubygems/rubygems/commit/a16eacd650
* [rubygems/rubygems] Don't fail when `uninstall --all` with default gemDavid Rodríguez2019-09-051-8/+5
| | | | | | | Instead, display an informative message saying that uninstallation of specific versions is being skipped because of being default gems. https://github.com/rubygems/rubygems/commit/b44845aa1d
* [rubygems/rubygems] Use IAM role to extract security-credentials for EC2 ↵Alexander Pakulov2019-09-051-5/+13
| | | | | | instance https://github.com/rubygems/rubygems/commit/9a401646e1
* [rubygems/rubygems] Move empty check earlierDavid Rodríguez2019-09-051-3/+5
| | | | https://github.com/rubygems/rubygems/commit/fc224e9717
* Fix keyword argument separation issues in libJeremy Evans2019-08-302-2/+2
| | | | Mostly requires adding ** in either calls or method definitions.
* require 'pp' before use PPKazuhiro NISHIYAMA2019-08-301-1/+4
| | | | | | | `Kernel#pp` has wrapper, but `PP` does not. https://github.com/ruby/ruby/runs/207405029#step:10:141 `NameError: uninitialized constant Bundler::Molinillo::Resolver::Resolution::PP`
* [rubygems/rubygems] Use `RbConfig::CONFIG['rubylibprefix']`Nobuyoshi Nakada2019-08-201-8/+1
| | | | | | It is defined since ruby 1.9.2. https://github.com/rubygems/rubygems/commit/84981ca908
* $LOAD_PATH elements should be real pathsNobuyoshi Nakada2019-08-181-1/+1
| | | | Installed path may contain symbolic links.
* Support the current stable version of Ruby like 2.5 and 2.6.Hiroshi SHIBATA2019-08-171-2/+2
|
* Revert "`Gem.load_path_insert_index always returns non-nil index after Ruby 1.9"Hiroshi SHIBATA2019-08-171-1/+1
| | | | | | This reverts commit 260ef51a73c067599826c8ab110c53994c1b6226. This broke the stable versions of Ruby like 2.4 and 2.5