Граф коммитов

79998 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 94bcae1b2a
Special treat when the first line ends with a dot [ci skip] 2023-10-04 19:27:34 +09:00
Takashi Kokubun 465bc682a2
YJIT: Call mprotect after entry stub failure (#8582)
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2023-10-03 22:39:45 -07:00
Daisuke Aritomo 6d28f96986
[DOC] Fix description for `rb_postponed_job_register_one()`
The current documentation for `rb_postponed_job_register_one()` is
explaining the differences with itself, where it should be explaining
the differences with `rb_postponed_job_register()`.
2023-10-04 14:12:50 +09:00
yui-knk ed8a3428e4 Remove not used fields from variable nodes 2023-10-04 12:15:39 +09:00
git 2e1762c9e0 Update default gems list at e501613efa [ci skip] 2023-10-04 02:51:27 +00:00
Nobuyoshi Nakada e501613efa [ruby/bigdecimal] Bump up to 3.1.5
https://github.com/ruby/bigdecimal/commit/c47802e813
2023-10-04 02:50:15 +00:00
Nobuyoshi Nakada d3fd4a6d32
BigDecimal#to_s has not changed for fraction part
The test for integer part was separated at dc54574ade.
2023-10-04 10:25:42 +09:00
Maxime Chevalier-Boisvert ea491802fa
YJIT: add heuristic to avoid compiling cold ISEQs (#8522)
* YJIT: Add counter to measure how often we compile "cold" ISEQs (#535)

Fix counter name in DEFAULT_COUNTERS

YJIT: add --yjit-cold-threshold, don't compile cold ISEQs

YJIT: increase default cold threshold to 200_000

Remove rb_yjit_call_threshold()

Remove conflict markers

Fix compilation errors

Threshold 1 should compile immediately

Debug deadlock issue with test_ractor

Fix call threshold issue with tests

* Revert exception threshold logic. Document option in yjid.md

* (void) for 0 parameter functions in C99

* Rename iseq_entry_cold => cold_iseq_entry

* Document --yjit-cold-threshold in ruby.c

* Update doc/yjit/yjit.md

Co-authored-by: Jean byroot Boussier <jean.boussier+github@shopify.com>

* Shorten help string to appease test

* Address bug found by Kokubun. Reorder logic.

---------

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: Jean byroot Boussier <jean.boussier+github@shopify.com>
2023-10-03 17:45:46 -04:00
Kevin Newton d47af93110 [ruby/prism] Provide pm_parser_err_current and pm_parser_err_previous
https://github.com/ruby/prism/commit/4828c96939
2023-10-03 18:46:37 +00:00
Kevin Newton ad0e8ddbdb [ruby/prism] Consolidate diagnostic appendings
https://github.com/ruby/prism/commit/4f107d8962
2023-10-03 18:46:36 +00:00
Daniel Colson accda74cbe [rubygems/rubygems] Prevent gem activation in standalone mode
As discussed in https://github.com/rubygems/rubygems/issues/6273#issuecomment-1449176658

The `gem` method behaves awkwardly in standalone mode. Assuming bundler
isn't loaded at all, a call to gem might activate a gem that is not part
of the bundle (because it's the gem method defined in
lib/rubygems/core_ext/kernel_gem.rb and not
lib/bundler/rubygems_integration.rb). And when running with
`--disable-gems`, the gem method won't be defined at all so we'll get a
NoMethodError.

Calls to `gem` can appear in dependencies outside an application's
control. To work around this at GitHub we defined our own `Kernel#gem`
that no-ops.

I agree with https://github.com/rubygems/rubygems/issues/6273#issuecomment-1440755882

> people using standalone mode don't want to activate gems like Kernel.gem

This commit redefines `Kernel#gem` in the standalone script to no-op.

https://github.com/rubygems/rubygems/commit/bea17b55f1
2023-10-03 17:16:19 +00:00
Takashi Kokubun 1992aef722
YJIT: Stop spilling temps on jit_prepare_routine_call (#8581)
YJIT: Remove spill_temps from jit_prepare_routine_call
2023-10-03 12:54:24 -04:00
Takashi Kokubun 68df43788d
Allow changing RUBY_PATCHLEVEL_STR if RUBY_PATCHLEVEL == -1 (#8578)
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-10-03 09:19:54 -07:00
git 32baa2c7df Update default gems list at 5dfbf1a381 [ci skip] 2023-10-03 15:12:39 +00:00
ima1zumi 5dfbf1a381 [ruby/reline] Bump version to 0.3.9
(https://github.com/ruby/reline/pull/594)

https://github.com/ruby/reline/commit/b6fb72718a
2023-10-03 15:10:59 +00:00
Nobuyoshi Nakada 10379ebf90
Support regexp in log-fix [ci skip] 2023-10-03 22:02:02 +09:00
David Rodriguez ed0661e618 [rubygems/rubygems] Don't re-resolve with prereleases if unlocked gem has no prereleases
https://github.com/rubygems/rubygems/commit/d76dc70d90
2023-10-03 09:42:31 +00:00
David Rodriguez b73ef92998 [rubygems/rubygems] Fix typo
https://github.com/rubygems/rubygems/commit/64e7a2656a
2023-10-03 09:42:31 +00:00
BurdetteLamar b4ab013b27
[DOC] Link fixes 2023-10-03 16:31:34 +09:00
Josef Šimánek 25b536cc2f
[rubygems/rubygems] Fix invalid links in documentation. - wrap ENV variables in <code> - fix rubygems.org link - fix zenspider.com link
https://github.com/rubygems/rubygems/commit/9eaac94a63
2023-10-03 16:13:18 +09:00
Peter Boling 9ffd659d47
[rubygems/rubygems] 🐛 Specification of branch or ref with tag is ambiguous
- Specs for GitProxy were incorrect and insufficient
- Specs are now correct and less insufficient

https://github.com/rubygems/rubygems/commit/63d0a8cfd0
2023-10-03 16:13:18 +09:00
Peter Boling 16a97c7bbb
[rubygems/rubygems] 🚨 Rubocop Linting
https://github.com/rubygems/rubygems/commit/2851e051c3
2023-10-03 16:13:18 +09:00
Josef Šimánek 0046c67dd8
[rubygems/rubygems] Fix typo: eglible -> eligible.
https://github.com/rubygems/rubygems/commit/1e487e1337
2023-10-03 16:13:18 +09:00
Burdette Lamar 798083fac8
[ruby/csv] [DOC] Fix broken links
(https://github.com/ruby/csv/pull/283)

https://github.com/ruby/csv/commit/af64a15b2f
2023-10-03 16:13:18 +09:00
Kosuke Shibata 2325e1cd81
[ruby/csv] Add CSV::InvalidEncodingError
(https://github.com/ruby/csv/pull/287)

To handle encoding errors in CSV parsing with the appropriate error
class

https://github.com/ruby/csv/commit/68b44887e5
2023-10-03 16:13:18 +09:00
Nobuyoshi Nakada 457971f4e2
[DOC] State the precision of `Process.times` as platform-defined
Remove the bad example that can lead to misunderstanding as if this
precision is defined in Ruby.
2023-10-03 14:42:47 +09:00
Nobuyoshi Nakada 8be9138de2
Check by integer modulo instead of float string 2023-10-03 14:27:51 +09:00
Nobuyoshi Nakada 2dee2662d8
Create dummy files in build dir in setup [ci skip] 2023-10-03 13:10:01 +09:00
Hiroshi SHIBATA 3b47fb2cb6 [rubygems/rubygems] Update suggested variable for bindir
https://github.com/rubygems/rubygems/commit/f9cc6fed25
2023-10-03 00:08:34 +00:00
Takashi Kokubun 492e9437dd
YJIT: Fix assert_no_exits (#8579) 2023-10-02 14:09:51 -07:00
Takashi Kokubun e6d730023d Trigger Cirrus if YJIT tests are modified 2023-10-02 14:09:26 -07:00
Nobuyoshi Nakada 9059dfce12
`yield` cannot be placed outside methods even in blocks 2023-10-02 23:20:03 +09:00
Peter Zhu 63e504d6e6 Dump name of method for imemo callinfo
This commit dumps the `mid` of the imemo callinfo when calling
`ObjectSpace.dump_all`.
2023-10-02 09:49:13 -04:00
BurdetteLamar 1943ea06a6 [ruby/prism] [DOC] Link fix
https://github.com/ruby/prism/commit/472bdc4d70
2023-10-02 13:22:53 +00:00
Benoit Daloze fd984ac869 Adopt prism CallNode#name changes 2023-10-02 09:18:56 -04:00
Benoit Daloze 87dad067e0 Sync with prism CallNode#name changes
* https://github.com/ruby/prism/pull/1533
2023-10-02 09:18:56 -04:00
Matt Valentine-House b6390a21eb [ci skip] More docs for InstructionSequence.compile
This commit documents that you can also pass a `File` object to
`RubyVM::InstructionSequence.compile`, instead of a string, and this
will behave in a similar way to
`RubyVM::InstructionSequence.compile_file`

e.g.

```
❯ ./ruby -e "puts RubyVM::InstructionSequence.compile(File.open('test.rb')).disasm"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(2,21)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] name@0
0000 putstring                              "Ruby"                    (   1)[Li]
0002 setlocal_WC_0                          name@0
0004 putself                                                          (   2)[Li]
0005 putobject                              "Hello, "
0007 getlocal_WC_0                          name@0
0009 dup
0010 objtostring                            <calldata!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>
0012 anytostring
0013 concatstrings                          2
0015 opt_send_without_block                 <calldata!mid:puts, argc:1, FCALL|ARGS_SIMPLE>
0017 leave

~/git/ruby master* ≡ ⇡
❯ ./ruby -e "puts RubyVM::InstructionSequence.compile(File.open('test.rb').read).disasm"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(2,21)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] name@0
0000 putstring                              "Ruby"                    (   1)[Li]
0002 setlocal_WC_0                          name@0
0004 putself                                                          (   2)[Li]
0005 putobject                              "Hello, "
0007 getlocal_WC_0                          name@0
0009 dup
0010 objtostring                            <calldata!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>
0012 anytostring
0013 concatstrings                          2
0015 opt_send_without_block                 <calldata!mid:puts, argc:1, FCALL|ARGS_SIMPLE>
0017 leave
```

This is explicitly allowed by this code path in
`rb_iseq_compile_with_option` so we should document it.

```
    if (RB_TYPE_P(src, T_FILE)) {
        parse = rb_parser_compile_file_path;
    }
    else {
        parse = rb_parser_compile_string_path;
        StringValue(src);
    }
```
2023-10-02 12:31:34 +01:00
yui-knk 4da04d5f43 Include new node types into %printer 2023-10-02 13:49:57 +09:00
Charles Oliver Nutter 35e0e440a2 [ruby/psych] Update SnakeYAML Engine to 2.7
https://github.com/ruby/psych/commit/094c811588
2023-10-02 11:47:36 +09:00
Charles Oliver Nutter 5c501bcbdb [ruby/psych] Add test for code_point_limit
Only supported on JRuby currently.

https://github.com/ruby/psych/commit/0c1754eefe
2023-10-02 11:47:35 +09:00
Harshal Bhakta f208f78bdf [rubygems/rubygems] Support Ruby's preview version format (Ex: 3.3.0-preview2) in Gemfile
https://github.com/rubygems/rubygems/commit/4c1a0511b6
2023-10-02 02:19:43 +00:00
Graham Marlow f3aea74c3d [rubygems/rubygems] Include gemspec in ExtensionTask for native gem tasks
https://github.com/rubygems/rubygems/commit/042cfb7007
2023-10-02 01:34:01 +00:00
Yuichiro Kaneko 1ed6fd8997 Check the result of get_nd_recv before node type check for safety
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-10-02 09:41:45 +09:00
yui-knk 81668579ed Remove not used fields from call nodes 2023-10-02 09:41:45 +09:00
yui-knk b1131851e0 Correctly casting node for accessing nd_recv, nd_mid and nd_args in compile.c 2023-10-02 09:41:45 +09:00
yui-knk fdc329ea6f Correctly casting node for accessing nd_args in parse.y 2023-10-02 09:41:45 +09:00
yui-knk c1894a9d8b Use rb_node_fcall_t instead of NODE 2023-10-02 09:41:45 +09:00
Burdette Lamar f9490110e1
[DOC] Another example for spawn (#8575) 2023-10-01 19:37:40 -04:00
Nobuyoshi Nakada 4909747e5a
Use the hexdigit character class 2023-10-02 00:49:05 +09:00
Nobuyoshi Nakada ec3d81629f
[Bug #19906] Add the test 2023-10-01 23:58:24 +09:00