summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-09Fix typo of namespaceaycabta
2021-12-09`Ractor.make_shareable` checks proc's seflKoichi Sasada
`Ractor.make_shareable(proc_obj)` raises an `IsolationError` if the self of `proc_obj` is not a shareable object. [Bug #18243] Notes: Merged: https://github.com/ruby/ruby/pull/5232
2021-12-09Fix typo in NEWS-2.5.0 [ci skip]Akihiro Sada
Notes: Merged: https://github.com/ruby/ruby/pull/5236 Merged-By: nobu <nobu@ruby-lang.org>
2021-12-09[rubygems/rubygems] Don't load system rubygems during testsDavid Rodríguez
Since tests are about testing our development copy of rubygems, not whatever is installed in the system. https://github.com/rubygems/rubygems/commit/f5e0b68cdd
2021-12-08YJIT: Fix leak in compilation loopAlan Wu
Previously, when there are too many blocks in a batch, the last block in the batch is not tracked in the array of batches and not freed. Notes: Merged: https://github.com/ruby/ruby/pull/5229
2021-12-08[ruby/ostruct] Bump version to 0.5.2Marc-André Lafortune
2021-12-08[ruby/ostruct] `Proc`'s self should be shareable.Koichi Sasada
To fix the issue https://bugs.ruby-lang.org/issues/18243 we need to make sure the Proc's self is shareable. These procs are used by `define_method` and it doesn't use Proc's self, so `nil` is enough.
2021-12-08Enhanced RDoc for String (#5227)Burdette Lamar
Treats: #replace #clear #chr #getbyte #setbyte #byteslice #reverse #reverse! #include? Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2021-12-09* 2021-12-09 [ci skip]git
2021-12-09ext/ripper/lib/ripper/lexer.rb: Do not deprecate Ripper::Lexer::State#[]Yusuke Endoh
The old code of IRB still uses this method. The warning is noisy on rails console. In principle, Ruby 3.1 deprecates nothing, so let's avoid the deprecation for the while. I think It is not so hard to continue to maintain it as it is a trivial shim. https://github.com/ruby/ruby/pull/5093 Notes: Merged: https://github.com/ruby/ruby/pull/5219
2021-12-08Add `to_f` to predefined conversion method name to ID tableNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5228
2021-12-08[DOC] Integer.try_convert [ci skip]Nobuyoshi Nakada
2021-12-08Skip bind port 1 when ip_unprivileged_port_start<=1Kazuhiro NISHIYAMA
Linux can allow to bind port 1 to user. And `ip_unprivileged_port_start` is 0 on [lima](https://github.com/lima-vm/lima) default vm. ``` 1) Socket#bind on SOCK_DGRAM socket raises Errno::EACCES when the current user does not have permission to bind FAILED Expected Errno::EACCES but no exception was raised (0 was returned) .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:38:in `block (4 levels) in <top (required)>' .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:4:in `<top (required)>' 2) Socket#bind on SOCK_STREAM socket raises Errno::EACCES when the current user does not have permission to bind FAILED Expected Errno::EACCES but no exception was raised (0 was returned) .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:79:in `block (4 levels) in <top (required)>' .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:44:in `<top (required)>' 3) Socket#bind using IPv4 using a packed socket address raises Errno::EACCES when the user is not allowed to bind to the port FAILED Expected Errno::EACCES but no exception was raised (0 was returned) .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:119:in `block (6 levels) in <top (required)>' .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:85:in `<top (required)>' 4) Socket#bind using IPv6 using a packed socket address raises Errno::EACCES when the user is not allowed to bind to the port FAILED Expected Errno::EACCES but no exception was raised (0 was returned) .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:119:in `block (6 levels) in <top (required)>' .../ruby/spec/ruby/library/socket/socket/bind_spec.rb:85:in `<top (required)>' ```
2021-12-07Avoid Array allocation when appending to args array (#5211)John Hawthorn
* Use duparray when possible for argspush ARGSPUSH is the node we see with a single value pushed to the end of a splatted array. ARGSCAT is similar, but is used when multiple values are being concatenated to the list. Previously only ARGSCAT had an optimization where when all the values were static it would use duparray instead of newarray to create the intermediate array. This commit adds similar behaviour for ARGSPUSH, using duparray instead of putobject/newarray. * Replace duparray with putobject before concatarray When performing duparray/concatarray we know we'll never use the intermediate array being created by duparray, so we should be able to use it as a temporary object. This avoids an extra array allocation for NODE_ARGSPUSH (ex. [*foo, 1]) and NODE_ARGSCAT (ex. [*foo, 1, 2]). Notes: Merged-By: jhawthorn <john@hawthorn.email>
2021-12-08[rubygems/rubygems] Remove unnecessary commentDavid Rodríguez
https://github.com/rubygems/rubygems/commit/5e50f12e7a
2021-12-08[rubygems/rubygems] Don't add custom github source to `bundle init` GemfileDavid Rodríguez
It's provided by bundler. https://github.com/rubygems/rubygems/commit/25ccaab46b
2021-12-08[rubygems/rubygems] Cancel deprecation of custom git sourcesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/99cd6e0627
2021-12-07YJIT: Undo add_block_version() in OOM code pathAlan Wu
Preivously, [1] failed to undo the effect of applying add_block_version() to a block, leaving dangling pointers in the iseq when compilation fails. [1]: d0772632bf2ff15f73c0d3601d958670a5c77855 Notes: Merged: https://github.com/ruby/ruby/pull/5226
2021-12-07YJIT: Remove guard_self_is_heap()Alan Wu
It's superseded by functionality added to jit_guard_known_klass(). In weird situations such as the ones in the included test, guard_self_is_heap() triggered assertions. Co-authored-by: Jemma Issroff <jemmaissroff@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/5225
2021-12-08* 2021-12-08 [ci skip]git
2021-12-08[rubygems/rubygems] Add require parameter to `bundle add``Simon Fish
Test and ensure "false" is handled Don't use yield_self to operate on autorequire Remove duplicate autorequire Add banner to require option Don't use json to break down require params Pass linter https://github.com/rubygems/rubygems/commit/a4f2f8ac17
2021-12-07[rubygems/rubygems] Pass "--" to git commands to separate positional and ↵David Rodríguez
optional args To make sure git uri's specified in Gemfile are never misinterpreted as optional arguments, potentially allowing for local code execution. https://github.com/rubygems/rubygems/commit/90b1ed8b9f
2021-12-07More indentation in NEWS.md [ci skip]Nobuyoshi Nakada
The current Markdown implementation of RDoc requires list contents to be indented 4 columns except for the first paragraph. Maybe fixed as other implementations in the future.
2021-12-07Fixed the check order in wmap_live_p [Bug #18392]Nobuyoshi Nakada
Check if the object is a pointer to heap before check the flag in that object. Notes: Merged: https://github.com/ruby/ruby/pull/5224
2021-12-07ObjectSpace::WeakMap#inspect: check if living object [Bug #18392]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5224
2021-12-07Move -ljemalloc to DLDLIBS [Bug #18391]Nobuyoshi Nakada
Set the alternative memory management library only as a platform specific library, without other libraries. Notes: Merged: https://github.com/ruby/ruby/pull/5223
2021-12-07Fix a link [ci skip]Kazuhiro NISHIYAMA
2021-12-06[ruby/ostruct] ostruct v0.5.1Marc-André Lafortune
2021-12-06[ruby/ostruct] Alias less methodsMarc-André Lafortune
Skips methods that do not end with letter (in particular `!~` and `=~`) For JRuby, also skip `instance_exec`, `instance_eval` and `eval`
2021-12-07NEWS.md: Describe the change of the default width of `pp`Yusuke Endoh
[Feature #12913]
2021-12-06YJIT: Add integrity checks for blockidAlan Wu
Verify that the iseq idx pair for the block is valid in invalidate_block_version(). While we are at it, bound loop iterating over instructions to `iseq_body->iseq_size`. Notes: Merged: https://github.com/ruby/ruby/pull/5222
2021-12-06YJIT: Fix incomplete invalidation from opt_setinlinecacheAlan Wu
As part of YJIT's strategy for promoting Ruby constant expressions into constants in the output native code, the interpreter calls rb_yjit_constant_ic_update() from opt_setinlinecache. The block invalidation loop indirectly calls rb_darray_remove_unordered(), which does a shuffle remove. Because of this, looping with an incrementing counter like done previously can miss some elements in the array. Repeatedly invalidate the first element instead. The bug this commit resolves does not seem to cause crashes or divergent behaviors. Co-authored-by: Jemma Issroff <jemmaissroff@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/5221
2021-12-06Enhanced RDoc for literals.rdoc (#5213)Burdette Lamar
Makes link targets among percent literals. Adds links to those targets. Adds examples to percent literals. Links from opening summary list to corresponding sections. Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2021-12-07add a NEWS entry for `mandatory_only?`Koichi Sasada
2021-12-07add a NEWS entry about GC.total_timeKoichi Sasada
2021-12-07add NEWS about the improvement of `Struct`Koichi Sasada
2021-12-07* 2021-12-07 [ci skip]git
2021-12-07[rubygems/rubygems] Don't cleanup paths from gems already activated from ↵David Rodríguez
`$LOAD_PATH` This way, if some default gem has been required before bundler, and rubygems has enhanced the `$LOAD_PATH` to use the latest version in the system, further requires of that default gem after bundler has been activated will use the same version and don't cause redefinition warnings or worse problems derived from the fact of mixing up two different versions. That, unless the gem is a `Gemfile` dependency. In that case, we'll get a mismatch error anyways as we do now. This fix doesn't mean that all default gems internally used by bundler/rubygems are now supported inside `Gemfile`'s. That should be handled case by case, but it will now bite people only when they try to add the gem to their `Gemfile`, not before. https://github.com/rubygems/rubygems/commit/7325530547
2021-12-06[rubygems/rubygems] Feature: accept pull request URLs as github sourceJean Boussier
Very often github source is used to temporarily use a modified gem while a PR upstream is being reviewed. So for instance https://github.com/ruby/bigdecimal/pull/211 will look like: ```ruby gem "bigdecimal", github: "casperisfine/bigdecimal", branch: "git-gem" # https://github.com/ruby/bigdecimal/pull/200 ``` It's annoying because you have to fiddle with the branch name, which is copied as `casperisfine:git-gem`, etc etc. If I could simply use the PR URL like this: ``` gem "bigdecimal", github: "https://github.com/ruby/bigdecimal/pull/211" ``` It would make a very common task for me so much simpler. https://github.com/rubygems/rubygems/commit/517c527751
2021-12-06[rubygems/rubygems] Allow using `Gem::Version` without loading the rest of ↵David Rodríguez
rubygems https://github.com/rubygems/rubygems/commit/1b862537a5
2021-12-06[rubygems/rubygems] Fix incorrect quotingDavid Rodríguez
Test was just returning a string instead of actually exercising the require. https://github.com/rubygems/rubygems/commit/62c827d7e1
2021-12-06[rubygems/rubygems] Add --version parameter to bundle info command.Josef Šimánek
https://github.com/rubygems/rubygems/commit/7d9fdd908d
2021-12-06autogen.sh: Copy auxiliary files instead of symlinks with `-i`Nobuyoshi Nakada
When accessing from containers, symbolic links may not be able to reach outer file systems. Notes: Merged: https://github.com/ruby/ruby/pull/5220 Merged-By: nobu <nobu@ruby-lang.org>
2021-12-06[rubygems/rubygems] add login & logout for the signin & signout commands ↵Colby Swandale
respectively https://github.com/rubygems/rubygems/commit/49b491970b
2021-12-06sync_default_gems.rb: convert commit hashes to github URLs [ci skip]Nobuyoshi Nakada
2021-12-06Clarify the error message when trying to import C methods [Bug #18385]Shugo Maeda
2021-12-06[rubygems/rubygems] LOAD_PATH is already reset globallyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b0bbb27115
2021-12-06[rubygems/rubygems] Remove unneded setupDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9815a04e31
2021-12-05Make `leaf` const in VM generatorAlan Wu
Assigning to `leaf` in insns.def would give undesirable results.
2021-12-06* 2021-12-06 [ci skip]git