Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4143
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3864
|
|
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with
https://github.com/rubygems/rubygems/pull/3820
|
|
Enable Style/EmptyLinesAroundClassBody rubocop cop.
|
|
with nil path
It's very unlikely to hit this case, but it is possible, as
Thread::Backtrace::Location#path can return nil if the location is
a cfunc with no previous iseq. See location_path in vm_backtrace.c
in Ruby.
https://github.com/rubygems/rubygems/commit/511935645a
Notes:
Merged: https://github.com/ruby/ruby/pull/3379
|
|
* See https://github.com/oracle/truffleruby/issues/2046
* `<internal:` is a common prefix also used by core Ruby files in CRuby.
* test_no_kernel_require_in_*warn_with_uplevel already test this.
* Unfortunately just skipping `<internal:` in the Ruby implementation
is not enough, because RubyGems' #warn would not skip the
`<internal:` require (TruffleRuby defines #require in Ruby),
and the Ruby implementation's #warn would not skip
RubyGems's #require. The #caller_locations(0) look like this:
warnee.rb:1:in `<top (required)>' # where #warn is called
<internal:core> core/kernel.rb:234:in `gem_original_require' # not skipped by RubyGems' warn, skipped by the Ruby impl
rubygems/core_ext/kernel_require.rb:54:in `require' # not skipped by the Ruby impl's warn, what would be shown without this fix
warn.rb:1:in `<main>' # what would be correct
warn.rb is
require "warnee"
warnee.rb is
puts caller_locations(0), nil
warn "oops", uplevel: 1
https://github.com/rubygems/rubygems/commit/7c838f7419
Notes:
Merged: https://github.com/ruby/ruby/pull/3379
|
|
To normalize the code style with `bundler`.
Notes:
Merged: https://github.com/ruby/ruby/pull/3379
|
|
To make rubygems code style consistent with bundler.
Notes:
Merged: https://github.com/ruby/ruby/pull/3229
|
|
'require'
https://github.com/rubygems/rubygems/commit/5995394ec4
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
|
|
The code is quite different now, so I think the link might be even
confusing. If you want to know more, use git history.
https://github.com/rubygems/rubygems/commit/db872c7a18
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
|
|
In the cases where the initial manually `-I` path resolution succeeded,
we were passing a full path to the original require effectively skipping
the `$LOADED_FEATURES` cache. With this change, we _only_ do the
resolution when a matching requirable path is found in a default gem. In
that case, we skip activation of the default gem if we detect that the
required file will be picked up for a `-I` path.
https://github.com/rubygems/rubygems/commit/22ad5717c3
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
|
|
https://github.com/rubygems/rubygems/commit/da1492e9d7
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
|
|
https://github.com/rubygems/rubygems/commit/ae95885dff
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
|
|
Our check for `-I` paths should not go through all activated gems.
https://github.com/rubygems/rubygems/commit/00d98eb8a3
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
|
|
https://github.com/rubygems/rubygems/commit/7fbef2f0e3
Notes:
Merged: https://github.com/ruby/ruby/pull/3092
|
|
Notes:
Merged-By: hsbt <hsbt@ruby-lang.org>
|
|
This reverts commit d767da428c28b7b9fec56b383bb32f6f76c6ad26.
It fails with spec/ruby/core/kernel/require_spec.rb:5
|
|
If `require "a"` is run when two folders have been specified in the -I
option including a "a.rb" file and a "a.so" file respectively, the ruby
spec says that the ".rb" file should always be preferred. However, the
logic we added in https://github.com/rubygems/rubygems/commit/6b81076d9
to make the -I option always beat default gems does not respect this
spec, creating a difference from the original ruby-core's require.
[the ruby spec says]: https://github.com/ruby/spec/blob/d80a6e2b221d4f17a8cadcac75ef950c59cba901/core/kernel/shared/require.rb#L234-L246
https://github.com/rubygems/rubygems/commit/b3944384f4
|
|
|
|
|
|
|
|
|
|
|
|
Monitor can be owned at the beginning of this method.
|
|
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.
|
|
Partly reverted 7d463e360b9c4718b17378eb52783116a01b884b
|
|
`File.symlink? safe_lp` can raise SecurityError and raising an
exception can leave RUBYGEMS_ACTIVATION_MONITOR locking. This
patch release it correctly.
|
|
|
|
|
|
This reverts commit 8b27c23b5d55bd707a89bb5d95d2bdba9e132c1a.
|
|
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian9/ruby-master/log/20191111T093005Z.fail.html.gz
|
|
* 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.
Notes:
Merged: https://github.com/ruby/ruby/pull/2666
|
|
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' _ {} \;
```
Notes:
Merged: https://github.com/ruby/ruby/pull/2662
|
|
And test the fix we're adding.
https://github.com/rubygems/rubygems/commit/6f86637b98
|
|
https://github.com/rubygems/rubygems/commit/cc255b774a
|
|
https://github.com/rubygems/rubygems/commit/506c5bce49
|
|
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.
Notes:
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
This reverts commit 260ef51a73c067599826c8ab110c53994c1b6226.
This broke the stable versions of Ruby like 2.4 and 2.5
|
|
|
|
|
|
|
|
|
|
This reverts commit 75d29db8f965893bb6ab38b9008abc80cdda246e.
|
|
This reverts commit 00cd5d74cecb6aa4a184e57e2b8246ef6e45d458.
|
|
Caused by 00cd5d74ce
|
|
I think this should be more efficient?
https://github.com/rubygems/rubygems/commit/a1de78104f
|
|
https://github.com/rubygems/rubygems/commit/fc3f722164
|
|
https://github.com/rubygems/rubygems/commit/41e60cdb6b
|
|
https://github.com/rubygems/rubygems/commit/6fbda98eb3
|
|
I picked the commit from 3c469e0da538428a0ddd94f99aa73c32da22e8ba
|