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

84871 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada ed4d03ea41
Make `dln_warning` a variadic macro 2024-04-07 16:44:42 +09:00
Nobuyoshi Nakada b5b54c19f6
Unify `ERRMSG1` and `ERRMSG2` to `ERRMSG_FMT` variadic macro 2024-04-07 16:43:52 +09:00
Samuel Williams dfa0897de8
Enumerator should use a non-blocking fiber. (#10478) 2024-04-07 19:18:09 +12:00
Nobuyoshi Nakada eaa6e4b228
[DOC] Update PTY documents
- Fix markups as RDoc.
- Remove already descriptions of removed methods.
2024-04-07 13:35:20 +09:00
yui-knk 6bfabd076b Remove undefined function's prototype declaration 2024-04-07 11:21:04 +09:00
yui-knk 70a0dd4162 Remove unused macro 2024-04-07 11:15:09 +09:00
yui-knk 7767db2379 Fix ripper to dispatch warning event for duplicated when clause
Need to separate `check_literal_when` function for parser and
ripper otherwise warning event is not dispatched because
parser `rb_warning1` is used in ripper.
2024-04-07 11:15:09 +09:00
Jeremy Evans ad90fdd24c Remove compiler code to handle blocks in attrasgn
Passing blocks is no longer allowed in attrasgn.  This is similar
to 3a674c9c65, but for attrasgn instead
of op_asgn.
2024-04-06 10:33:16 -07:00
yui-knk 0b4db711dd Remove unused function from `struct rb_parser_config_struct` 2024-04-06 22:03:26 +09:00
yui-knk 02f5e627a4 Remove redundant conversion between int and object 2024-04-06 22:03:26 +09:00
yui-knk 977672731f Fix a variable name
The first argument of `WARN_SPACE_CHAR` is always `c2` in caller
side, so `c` equals to `c2`.
2024-04-06 22:03:08 +09:00
Nobuyoshi Nakada df8f1f78f0
[Feature #20329] Separate additional flags from main dump options
Additional flags are comma separated list preceeded by `-` or `+`.

Before:
```sh
$ ruby --dump=insns+without_opt
```

After:
```sh
$ ruby --dump=insns-opt,-optimize
```

At the same time, `parsetree_with_comment` is split to `parsetree`
option and additional `comment` flag.

Before:
```sh
$ ruby --dump=parsetree_with_comment
```

After:
```sh
$ ruby --dump=parsetree,+comment
```

Also flags can be separate `--dump`.
```sh
$ ruby --dump=parsetree --dump=+comment --dump=+error_tolerant
```

Ineffective flags are ignored silently.
```sh
$ ruby --dump=parsetree --dump=+comment --dump=+error_tolerant
```
2024-04-06 20:27:02 +09:00
Nobuyoshi Nakada 9b5d4274a2
[Feature #20329] Clean up dump sub-options
Restructure `insns_without_opt` and `parsetree_with_comment` as
`insns+without_opt` and `parsetree+with_comment` respectively, like
`+error-tolerant`.
2024-04-06 20:27:01 +09:00
Nobuyoshi Nakada b006919200 `objspace_each_pages` is also only used if GC compression is possible 2024-04-06 18:51:24 +09:00
Mari Imaizumi c2d02a6ac2 [ruby/reline] Continue processing even if terminfo database couldn't
be found
(https://github.com/ruby/reline/pull/673)

Fix https://github.com/ruby/reline/issues/447 https://github.com/ruby/reline/issues/543

This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo.
It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received.

Reline should not abort the process because of missing Terminfo.
Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded.
And does the same when Terminfo is present but TERM is not.
ebab2875f1/lib/reline/terminfo.rb (L156-L160)

You can check the operation with `TERM=foo bundle exec bin/console`.

https://github.com/ruby/reline/commit/4ce247ce2b
2024-04-06 09:24:53 +00:00
yui-knk f022a700bf Remove imemo type check for NODE
In the past, `rb_iseq_compile_node` received `NODE *`
and `struct vm_ifunc *` as `node`. But after e743a35,
the function only receives `NODE *`.
This commit removes imemo type check to reduce the dependence
on `VALUE flags` of `struct RNode`.
2024-04-06 18:20:31 +09:00
S-H-GAMELINKS dae503874d Remove unused functions from `struct rb_parser_config_struct` 2024-04-06 09:29:44 +09:00
git c6c75f3399 Update default gems list at f2ac26d914 [ci skip] 2024-04-05 21:44:54 +00:00
Kevin Newton f2ac26d914 [ruby/prism] Bump to v0.25.0
https://github.com/ruby/prism/commit/4da514456f
2024-04-05 21:44:06 +00:00
Peter Zhu 43dcf4d1a6 Assert correct types in get_id_serial_entry 2024-04-05 16:15:48 -04:00
Peter Zhu a80e8ba1c4 Assert correct types in set_id_entry 2024-04-05 16:15:40 -04:00
Peter Zhu 37490474c4 Assert that rb_sym2str returns 0 or a T_STRING 2024-04-05 16:15:33 -04:00
Peter Zhu e50590a541 Assert that Symbol#inspect returns a T_STRING 2024-04-05 16:15:28 -04:00
Kevin Newton fbeb8f2c78 [ruby/prism] Set up location correctly for hashed locals
https://github.com/ruby/prism/commit/0334140790
2024-04-05 19:24:04 +00:00
Kevin Newton 1953ead74e [ruby/prism] Use a simpler and faster hash function for locals
https://github.com/ruby/prism/commit/5f56bf4464
2024-04-05 19:24:04 +00:00
Kevin Newton a801889c58 [ruby/prism] Do not warn for locals that start with _
https://github.com/ruby/prism/commit/8b8d66e55d
2024-04-05 19:24:03 +00:00
Kevin Newton 37ba6927d1 [ruby/prism] Always calloc the locals resize
https://github.com/ruby/prism/commit/8bbd3fef6f
2024-04-05 19:24:03 +00:00
Kevin Newton 3b59addaf1 [ruby/prism] Provide documentation for the new local tables
https://github.com/ruby/prism/commit/7a47a1351f
2024-04-05 19:24:01 +00:00
Kevin Newton 413a151a6b [ruby/prism] Explicitly cast from uint64_t to double for mid-square hash
https://github.com/ruby/prism/commit/06c6501044
2024-04-05 19:24:01 +00:00
Kevin Newton 5e93cf9250 [ruby/prism] Optimize pm_locals_order
https://github.com/ruby/prism/commit/13fe4e03c7
2024-04-05 19:24:01 +00:00
Kevin Newton 3638aeb4cb [ruby/prism] Refactor around pm_parser_scope_find
https://github.com/ruby/prism/commit/79d83eb95e
2024-04-05 19:24:00 +00:00
Kevin Newton dcec1e0dc6 [ruby/prism] Replace old circular parameter definition detection
https://github.com/ruby/prism/commit/c739f8e194
2024-04-05 19:24:00 +00:00
Kevin Newton bf3a911d1b [ruby/prism] Do not warn on unused parameters
https://github.com/ruby/prism/commit/c8d222640a
2024-04-05 19:23:59 +00:00
Kevin Newton b5b4628991 [ruby/prism] Warn on unused local variables
https://github.com/ruby/prism/commit/de111935fb
2024-04-05 19:23:59 +00:00
Kevin Newton e6aeacb099 [ruby/prism] Lazily hash locals
https://github.com/ruby/prism/commit/ef8ea4624a
2024-04-05 19:23:58 +00:00
Kevin Newton f9c05a65c9 [ruby/prism] Track the number of reads for local variables
https://github.com/ruby/prism/commit/dce64f4640
2024-04-05 19:23:58 +00:00
Kevin Newton 540cc886b9 [ruby/prism] Make the locals set switch from list to hash dynamically
https://github.com/ruby/prism/commit/c977c4c98a
2024-04-05 19:23:57 +00:00
Kevin Newton 358aeb103b [ruby/prism] Switch locals to use a hash
https://github.com/ruby/prism/commit/f38946021e
2024-04-05 19:23:57 +00:00
Peter Zhu 1f84e1099e [DOC] Add nodoc for GC.remove_stress_to_class
This method is only available when compiled with GC_DEBUG_STRESS_TO_CLASS
is enabled, so it's not available on release builds of Ruby.
2024-04-05 13:46:47 -04:00
Peter Zhu 46ebc48e62 [DOC] Add nodoc for GC.add_stress_to_class
This method is only available when compiled with GC_DEBUG_STRESS_TO_CLASS
is enabled, so it's not available on release builds of Ruby.
2024-04-05 13:45:12 -04:00
Joshua Broughton f87e60f1f4 [ruby/irb] Filter backtrace before format in handle_exception
(https://github.com/ruby/irb/pull/916)

handle_exception now applies the filter_backtrace to exception
backtraces prior to formatting the lines with Exception#full_message

This fixes a bug in upstream projects, notably Rails, where the
backtrace filtering logic expects the lines to be formatted as
Exception#backtrace.

https://github.com/ruby/irb/commit/805ee008f9

Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
2024-04-05 16:25:52 +00:00
Peter Zhu dbe8886f4d Remove deprecated function rb_gc_force_recycle
This function has been deprecated since Ruby 3.1, so we should remove it
for Ruby 3.4.
2024-04-05 11:39:54 -04:00
Kevin Newton 831b06ea3d [PRISM] Enable test_argument_forwarding_with_anon_rest_kwrest_and_block 2024-04-05 09:06:59 -04:00
Hiroshi SHIBATA 16c5e34c74 Use rake-13.2.1 2024-04-05 17:36:16 +09:00
git b60bf35cc7 Update bundled gems list as of 2024-04-05 2024-04-05 06:59:50 +00:00
yui-knk 9d1d2de2fe Make `nd_plen` to be int to reduce `rb_long2int` usage 2024-04-05 14:25:04 +09:00
dependabot[bot] f890070fd3 Bump lewagon/wait-on-check-action from 1.3.3 to 1.3.4
Bumps [lewagon/wait-on-check-action](https://github.com/lewagon/wait-on-check-action) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/lewagon/wait-on-check-action/releases)
- [Commits](595dabb3ac...ccfb013c15)

---
updated-dependencies:
- dependency-name: lewagon/wait-on-check-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 20:07:07 -07:00
yui-knk bd728a625a Remove unused functions from `struct rb_parser_config_struct` 2024-04-05 10:04:48 +09:00
David Rodriguez 58d03c3458 [rubygems/rubygems] Fix crash with development bundler binstub
Fixes the following error:

````
$ ruby /home/deivid/code/rubygems/rubygems/bundler/spec/support/bundle.rb clean --force
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
TypeError: no implicit conversion of Pathname into String
  /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:167:in `match'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:167:in `block in clean'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:164:in `each'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:164:in `clean'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli/clean.rb:13:in `run'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli.rb:590:in `clean'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli.rb:34:in `dispatch'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli.rb:28:in `start'
          /home/deivid/code/rubygems/rubygems/bundler/exe/bundle:28:in `block in <top (required)>'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
          /home/deivid/code/rubygems/rubygems/bundler/exe/bundle:20:in `<top (required)>'
          /home/deivid/code/rubygems/rubygems/bundler/spec/support/bundle.rb:5:in `load'
          /home/deivid/code/rubygems/rubygems/bundler/spec/support/bundle.rb:5:in `<main>'

```
(...)
````

https://github.com/rubygems/rubygems/commit/ff7ce7eb6d
2024-04-05 09:34:51 +09:00
tomoya ishida 4e48d2724e
[ruby/reline] Thread safe readline
(https://github.com/ruby/reline/pull/669)

Block until other Reline.readline or Reline.readmultiline finish

https://github.com/ruby/reline/commit/ebab2875f1
2024-04-05 09:34:28 +09:00