Commit graph

84976 commits

Author SHA1 Message Date
Samuel Williams
b473d304d4
Revert "Enumerator should use a non-blocking fiber. (#10478)" (#10480)
This reverts commit dfa0897de8.

This commit accidentally included some change in `parse.h`. Reverting
and re-applying the relevant changes.
2024-04-07 10:20:22 +00:00
Nobuyoshi Nakada
b88e0d6653
Merge push_include and ruby_push_include 2024-04-07 17:29:24 +09:00
Nobuyoshi Nakada
0d93fd0f69
Merge push_include_cygwin into push_include 2024-04-07 17:29:23 +09:00
Nobuyoshi Nakada
0620f006c2
Remove translit_char
It has been used only for DOSISH other than Windows.
2024-04-07 17:29:23 +09:00
Samuel Williams
bdb1fc1e5b
Prefer to use Fiber#transfer in scheduler implementation. (#10479) 2024-04-07 19:57:15 +12:00
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`.

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
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
0334140790
2024-04-05 19:24:04 +00:00
Kevin Newton
1953ead74e [ruby/prism] Use a simpler and faster hash function for locals
5f56bf4464
2024-04-05 19:24:04 +00:00
Kevin Newton
a801889c58 [ruby/prism] Do not warn for locals that start with _
8b8d66e55d
2024-04-05 19:24:03 +00:00
Kevin Newton
37ba6927d1 [ruby/prism] Always calloc the locals resize
8bbd3fef6f
2024-04-05 19:24:03 +00:00
Kevin Newton
3b59addaf1 [ruby/prism] Provide documentation for the new local tables
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
06c6501044
2024-04-05 19:24:01 +00:00
Kevin Newton
5e93cf9250 [ruby/prism] Optimize pm_locals_order
13fe4e03c7
2024-04-05 19:24:01 +00:00
Kevin Newton
3638aeb4cb [ruby/prism] Refactor around pm_parser_scope_find
79d83eb95e
2024-04-05 19:24:00 +00:00
Kevin Newton
dcec1e0dc6 [ruby/prism] Replace old circular parameter definition detection
c739f8e194
2024-04-05 19:24:00 +00:00
Kevin Newton
bf3a911d1b [ruby/prism] Do not warn on unused parameters
c8d222640a
2024-04-05 19:23:59 +00:00
Kevin Newton
b5b4628991 [ruby/prism] Warn on unused local variables
de111935fb
2024-04-05 19:23:59 +00:00
Kevin Newton
e6aeacb099 [ruby/prism] Lazily hash locals
ef8ea4624a
2024-04-05 19:23:58 +00:00
Kevin Newton
f9c05a65c9 [ruby/prism] Track the number of reads for local variables
dce64f4640
2024-04-05 19:23:58 +00:00
Kevin Newton
540cc886b9 [ruby/prism] Make the locals set switch from list to hash dynamically
c977c4c98a
2024-04-05 19:23:57 +00:00
Kevin Newton
358aeb103b [ruby/prism] Switch locals to use a hash
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.

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