summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-16[rubygems/rubygems] Improve `bundler/setup` performance againDavid Rodríguez
On a different patch, it was noticed Ngam Pham that we are calling `LazySpecification#hash` many times, and simply memoizing that led to a very considerable performance improvement in his app. I noticed though that we shouldn't be calling `LazySpecification#hash` that many times, and I located the culprit at `SpecSet#for` where we were deduplicating the partial aggregated result on every iteration. It is enough to do it just once at the end. This leads on a 12% speedup on Rails repository Gemfile vs the previous 8% I was getting from memoizing `LazySpecification#hash`. Also, after this patch memoizing `LazySpecification#hash` has no effect in performance anymore. https://github.com/rubygems/rubygems/commit/68d00a9edd Co-authored-by: Ngan Pham <ngan@users.noreply.github.com>
2022-05-16Add `make test-annocheck` to detect security issues.Jun Aruga
* Note that as the annocheck binary package is not available on Ubuntu, and it is working in progress in Debian, the script uses Fedora container, and it requires docker or podman command. https://www.debian.org/devel/wnpp/itp.en.html https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926470 * .github/workflows/compilers.yml: Add "gcc-11 annocheck" case. To pass the CI, set `TEST_ANNOCHECK_OPTS: "--skip-pie --skip-notes"` for now. See <https://bugs.ruby-lang.org/issues/18061>. * Skip MJIT tests in case of annocheck case. The MJIT tests fail in the annocheck case. See <https://bugs.ruby-lang.org/issues/18781>. Notes: Merged: https://github.com/ruby/ruby/pull/5900
2022-05-16* 2022-05-16 [ci skip]git
2022-05-16[ruby/racc] [DOC] Remove stale `Object::ParseError` documentationNobuyoshi Nakada
https://github.com/ruby/racc/commit/4ecc13c9cb
2022-05-15* 2022-05-15 [ci skip]git
2022-05-15Fix various autoload race conditions. (#5898)Samuel Williams
* Add RUBY_VM_CRITICAL_SECTION for detecting unexpected context switch. * Prevent race between GC mark and autoload setup. * Protect race on autoload state. * Avoid potential race condition when allocating `autoload_featuremap`. * Add NEWS entry for autoload fixes. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-05-14[ruby/fileutils] [DOC] Enhanced RDoc for #ln ↵Burdette Lamar
(https://github.com/ruby/fileutils/pull/69) Enhanced RDoc for #ln https://github.com/ruby/fileutils/commit/79fc67f03f Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13Fix compiler warning when USE_RVARGC=0Matt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/5909
2022-05-14* 2022-05-14 [ci skip]git
2022-05-14[ruby/logger] [DOC] Enhanced RDoc for Logger ↵Burdette Lamar
(https://github.com/ruby/logger/pull/77) Enhanced RDoc for Logger https://github.com/ruby/logger/commit/c601ed0370 Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13Print function name in backtrace when availablePeter Zhu
If we don't have `saddr` but have `sname` we should output `sname`. Notes: Merged: https://github.com/ruby/ruby/pull/5906
2022-05-13[ruby/logger] Update lib/logger.rbBurdette Lamar
https://github.com/ruby/logger/commit/a5a2f2da4a Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13[ruby/logger] Update lib/logger.rbBurdette Lamar
https://github.com/ruby/logger/commit/e6f2c64fc6 Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13[ruby/logger] Update lib/logger.rbBurdette Lamar
https://github.com/ruby/logger/commit/3dc5a8d7a4 Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13[ruby/logger] Update lib/logger.rbBurdette Lamar
https://github.com/ruby/logger/commit/98919e09e5 Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13[ruby/logger] Update lib/logger.rbBurdette Lamar
https://github.com/ruby/logger/commit/073a892ad9 Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2022-05-13[ruby/logger] Update lib/logger.rbBurdette Lamar
https://github.com/ruby/logger/commit/6d91281f7f Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2022-05-13[ruby/logger] Update lib/logger.rbBurdette Lamar
https://github.com/ruby/logger/commit/34c0ba8baa Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2022-05-13[ruby/logger] Enhanced RDoc for LoggerBurdetteLamar
https://github.com/ruby/logger/commit/16556d06d1
2022-05-13[rubygems/rubygems] Fix `Gemfile.lock` versions leaking to `bundler/inline` ↵David Rodríguez
install output The lockfile is completely ignored in inline mode, yet the previous output would suggest it wasn't. https://github.com/rubygems/rubygems/commit/763125a745
2022-05-13[rubygems/rubygems] Normalize parameter nameDavid Rodríguez
The other sources use `options` which reads better. https://github.com/rubygems/rubygems/commit/a672f9d602
2022-05-13Stop `build_extensions` when DESTDIR setKazuhiro NISHIYAMA
Try to fix `make install without root privilege` failures on snapshot CIs. example: https://github.com/ruby/actions/actions/runs/2315349280
2022-05-12YJIT: Implement getblockparamAaron Patterson
This implements the getblockparam instruction. There are two cases we need to handle depending on whether or not VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM is set in the environment flag. When the modified flag is unset, we need to call rb_vm_bh_to_procval to get a proc from our passed block, save the proc in the environment, and set the modified flag. In the case that the modified flag is set we are able to just use the existing proc in the environment. One quirk of this is that we need to call jit_prepare_routine_call early and ensure we update PC and SP regardless of the branch taken, so that we have a consistent SP offset at the start of the next instruction. We considered using a chain guard to generate these two paths separately, but decided against it because it's very common to see both and the modified case is basically a subset of the instructions in the unmodified case. This includes tests for both getblockparam and getblockparamproxy which was previously missing a test. Notes: Merged: https://github.com/ruby/ruby/pull/5881
2022-05-13* remove trailing spaces. [ci skip]git
2022-05-12Add documentation section to READMEStan Lo
Notes: Merged: https://github.com/ruby/ruby/pull/5904
2022-05-13* 2022-05-13 [ci skip]git
2022-05-12YJIT: Fix getting the EP with registers other than RAX (#5882)Aaron Patterson
Before this commit we were accidentally clobbering RAX. Additionally, since this function had RAX hardcoded then the function may not have worked with registers other than RAX. Co-authored-by: John Hawthorn <john@hawthorn.email> Notes: Merged-By: jhawthorn <john@hawthorn.email>
2022-05-12.github/workflows/compilers.yml: Add configure --enable-mkmf-verbose case.Jun Aruga
Notes: Merged: https://github.com/ruby/ruby/pull/5879
2022-05-12mkmf: Add a configure option to set verbose mode (V=1 or 0) in mkmf.rb.Jun Aruga
Note this change is only for `configure.ac`, not for Windows using `win32/configure.bat`. ``` $ ./configure --help | grep mkmf --enable-mkmf-verbose enable verbose in mkmf ``` Run the following command to enable the mkmf verbose mode. ``` $ ./configure --enable-mkmf-verbose $ grep MKMF_VERBOSE config.status S["MKMF_VERBOSE"]="1" ``` In this mkmf verbose mode, when compiling a native extension, the `rake compile` prints the compiling commands such as "gcc -I. <...> path/to/file" instead of "compiling path/to/file". ``` $ git clone https://github.com/deivid-rodriguez/byebug.git $ cd byebug $ bundle install --standalone $ bundle exec rake compile ... gcc -I. <...> path/to/file ... ``` Notes: Merged: https://github.com/ruby/ruby/pull/5879
2022-05-12[ruby/uri] Improve URI.register_scheme tests and automatically upcase the ↵Benoit Daloze
given scheme * Also add docs and mention current limitations. * For reference, https://stackoverflow.com/a/3641782/388803 mentions the valid characters in schemes. https://github.com/ruby/uri/commit/4346daac75
2022-05-12[ruby/uri] Add URI::Generic#decoded_#{user,password}Jeremy Evans
URI::Generic#{user,password} return the encoded values, which are not that useful if you want to do authentication with them. Automatic decoding by default would break backwards compatibility. Optional automatic decoding via a keyword to URI.parse would require threading the option through at least 3 other methods, and would make semantics confusing (user= takes encoded or unencoded password?) or require more work. Thus, adding this as a separate method seemed the simplest approach. Unfortunately, URI lacks a method for correct decoding. Unlike in www form components, + in earlier parts of the URI such as the userinfo section is treated verbatim and not as an encoded space. Add URI.#{en,de}code_uri_component methods, which are almost the same as URI.#{en,de}code_www_form_component, but without the special SP => + handling. Implements [Feature #9045] https://github.com/ruby/uri/commit/16cfc4e92f
2022-05-12[ruby/uri] Update file.rbFrank Schmitt
The module here is called `URI`, so it's probably reasonable to expect a requirement for the path to be RFC3986-compliant, but on the other hand, the class is called `File`, so it might be reasonable to expect that a path produced by e.g. the `File` class would be consumable by its `build` method (this fails if the filename contains e.g. a space). https://github.com/ruby/uri/commit/ef79789b83
2022-05-12Quick markup fixAlexey Mostovoy
Notes: Merged: https://github.com/ruby/ruby/pull/5902
2022-05-12Write Thread instead of ThreadeKaíque Kandy Koga
Notes: Merged: https://github.com/ruby/ruby/pull/5903
2022-05-11Add a separate doc for contributing to stdlibs [ci skip]Stan Lo
co-authored-by: Peter Zhu <peter@peterzhu.ca> Notes: Merged: https://github.com/ruby/ruby/pull/5901
2022-05-12[ruby/fileutils] Update lib/fileutils.rbBurdette Lamar
https://github.com/ruby/fileutils/commit/4771925fee Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-12[ruby/fileutils] Enhanced RDoc for FileUtilsBurdetteLamar
https://github.com/ruby/fileutils/commit/a0ea474214
2022-05-12[ruby/rdoc] Fix dead link in RDoc::MarkupPeter Zhu
https://github.com/ruby/rdoc/commit/521c9ebd29
2022-05-12* 2022-05-12 [ci skip]git
2022-05-11Ruby shovel operator (<<) speedup. (#5896)Noah Gibbs
For string concat, see if compile-time encoding of strings matches. If so, use simple buffer string concat at runtime. Otherwise, use encoding-checking string concat. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-05-11Improve documentation on contributing to RubyJemma Issroff
co-authored-by: Peter Zhu <peter@peterzhu.ca> co-authored-by: Stan Lo <stan001212@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/5899
2022-05-11[ruby/fileutils] Enhanced RDoc for FileUtilsBurdetteLamar
https://github.com/ruby/fileutils/commit/c38fd02372
2022-05-11[ruby/fileutils] Enhanced RDoc for FileUtilsBurdetteLamar
https://github.com/ruby/fileutils/commit/7b60f2d63b
2022-05-11* 2022-05-11 [ci skip]git
2022-05-11[rubygems/rubygems] Fix error message on metadata mismatchesDavid Rodríguez
Previously we were removing not installable specs. However, if those are the only ones, that would result in a bad error message. If we still choose them as a last resort, Bundler will later check metadata right before installing a give a proper error. This is a regression of https://github.com/rubygems/rubygems/commit/565549260be5 and the fix is to revert that commit. https://github.com/rubygems/rubygems/commit/bc18912257
2022-05-11[rubygems/rubygems] Tweak negative expectationsDavid Rodríguez
The follow a tweak on the yank message. https://github.com/rubygems/rubygems/commit/f6817bfe58
2022-05-11[rubygems/rubygems] Extract a `next_ruby_minor` helper method for specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/66eae0ef1d
2022-05-10Write have instead of have have [ci skipKaíque Kandy Koga
Notes: Merged: https://github.com/ruby/ruby/pull/5897 Merged-By: nobu <nobu@ruby-lang.org>
2022-05-10Fix the order of assert_eqaul and remove unused variablesNobuyoshi Nakada
2022-05-10Honor --with-thread option to enable pthreadNobuyoshi Nakada