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

84351 Коммитов

Автор SHA1 Сообщение Дата
Peter Zhu ff51dc5654 [Feature #20265] Remove rb_newobj_of and RB_NEWOBJ_OF 2024-03-14 12:53:04 -04:00
Peter Zhu 8e1831406f [Feature #20265] Remove rb_newobj and RB_NEWOBJ 2024-03-14 12:53:04 -04:00
Jean byroot Boussier 161545d55d [ruby/reline] Ensure compatibility with frozen string literals
(https://github.com/ruby/reline/pull/643)

Ref: https://bugs.ruby-lang.org/issues/20205

Ruby is moving forward with enabling frozen string literals
in the future.

Reline being part of the ruby-core test suite should work when
ruby is ran with `--enable-frozen-string-literal`.

https://github.com/ruby/reline/commit/7e2de64cf0

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2024-03-14 16:09:12 +00:00
Go d10afe0357 [ruby/irb] Rescue from exceptions raised by #name
(https://github.com/ruby/irb/pull/899)

* Rescue from exceptions raised by #name

Irb might terminate if the class overwrites `name` and raise errors. This commit rescue irb from termination.

* fix for other unknown patterns

https://github.com/ruby/irb/commit/35b87cf893
2024-03-14 15:41:03 +00:00
hogelog 3822ca9884 [ruby/irb] Add disable_irb command to disable debug of binding.irb
(https://github.com/ruby/irb/pull/898)

* Add disable_irb command to disable debug of binding.irb

* disable_irb doesn't override Kernel.exit

Kernel.exit call is removed because disable_irb does not override Kernel.exit
and workaround to https://bugs.ruby-lang.org/issues/18234 is not needed.

https://github.com/ruby/irb/commit/29901e4f21
2024-03-14 15:40:27 +00:00
Peter Zhu 83618f2cfa [Feature #20306] Implement ruby_free_at_exit_p
ruby_free_at_exit_p is a way for extensions to determine whether they
should free all memory at shutdown.
2024-03-14 08:33:30 -04:00
Jean Boussier 315bde5a0f `Exception#set_backtrace` accept arrays of `Backtrace::Location`
[Feature #13557]

Setting the backtrace with an array of strings is lossy. The resulting
exception will return nil on `#backtrace_locations`.

By accepting an array of `Backtrace::Location` instance, we can rebuild
a `Backtrace` instance and have a fully functioning Exception.

Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
2024-03-14 11:38:40 +01:00
Nobuyoshi Nakada 5326337d4f [Feature #20244] Issue a single `Warning.warn` call
Make the entire series of message lines a multiline string so that the
`Warning.warn` hook can receive them in a single call.
2024-03-14 18:33:28 +09:00
Nobuyoshi Nakada 67fe047821 [Feature #20244] Register global variable for another thread
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2024-03-14 18:33:28 +09:00
Nobuyoshi Nakada 4bb8f8582f [Feature #20244] Show the conflicting another chdir block 2024-03-14 18:33:28 +09:00
Nobuyoshi Nakada 8fe86feecd [Feature #20244] Extract `chdir_lock` and its stuffs 2024-03-14 18:33:28 +09:00
Nobuyoshi Nakada 1ad366134d
[Feature #20293] Add `Warning.categories` 2024-03-14 17:56:55 +09:00
Nobuyoshi Nakada f36a71e269 [Bug #20307] Fix `Hash#update` to make frozen copy of string keys 2024-03-14 17:49:37 +09:00
Nobuyoshi Nakada cd774f4ab9 Extract `RHASH_STRING_KEY_P` 2024-03-14 17:49:37 +09:00
Nobuyoshi Nakada c1279a3da5 Extract `RHASH_IDENTHASH_P` 2024-03-14 17:49:37 +09:00
Hiroshi SHIBATA fdf1fa5f5f
Revert "Warn ostruct for Ruby 3.5"
This reverts commit 1acbdc76d6.

I need to remove ostruct from Rake or fix bundler example.

https://github.com/ruby/ruby/actions/runs/8277371220/job/22647605911#step:11:3428
2024-03-14 17:41:24 +09:00
Hiroshi SHIBATA 1acbdc76d6
Warn ostruct for Ruby 3.5 2024-03-14 17:07:23 +09:00
git d5e9942ad2 Update bundled gems list at 04fc9f87be [ci skip] 2024-03-14 07:28:19 +00:00
Hiroshi SHIBATA 04fc9f87be
Use released version of bigdecimal 2024-03-14 16:27:37 +09:00
Hiroshi SHIBATA 1cffaf1c25
minitest-5.22.3 tag is not available yet 2024-03-14 15:12:03 +09:00
git cc141b619e Update bundled gems list at 07b40044ad [ci skip] 2024-03-14 05:22:55 +00:00
Hiroshi SHIBATA 07b40044ad
Use released version of minitest 2024-03-14 14:21:50 +09:00
Nobuyoshi Nakada 578f96afb5 [ruby/stringio] [DOC] Package rdoc files
https://github.com/ruby/stringio/commit/8522c90e4b
2024-03-14 04:30:28 +00:00
Nobuyoshi Nakada c913f3347c [ruby/stringio] [DOC] Add missing documents
https://github.com/ruby/stringio/commit/9cc1dfa19c
2024-03-14 04:30:28 +00:00
Nobuyoshi Nakada 35706c608c [ruby/stringio] [DOC] Add rdoc task
https://github.com/ruby/stringio/commit/5dd52d4aec
2024-03-14 04:30:27 +00:00
Nobuyoshi Nakada b01d319ec8 [ruby/fcntl] [DOC] Package files for RDoc
https://github.com/ruby/fcntl/commit/b946e505f1
2024-03-14 04:19:46 +00:00
Nobuyoshi Nakada e394f5539e [ruby/fcntl] [DOC] Package document files
https://github.com/ruby/fcntl/commit/ed2d725505
2024-03-14 04:01:24 +00:00
Nobuyoshi Nakada 4ae67b1ab5 [ruby/fcntl] [DOC] Add missing documents
https://github.com/ruby/fcntl/commit/a201ed6682
2024-03-14 03:49:40 +00:00
Nobuyoshi Nakada 085daf4840 [ruby/fcntl] [DOC] Add task and files for RDoc
https://github.com/ruby/fcntl/commit/1c7c70fa5d
2024-03-14 03:49:40 +00:00
Nobuyoshi Nakada 5fe1853e9b [ruby/fcntl] Reduce duplicate `O_ACCMODE` definitions
https://github.com/ruby/fcntl/commit/6a6442a7f8
2024-03-14 03:49:38 +00:00
Nobuyoshi Nakada d49b41566b [ruby/fcntl] [DOC] Remove redundant directives
https://github.com/ruby/fcntl/commit/a99909a90f
2024-03-14 03:49:37 +00:00
Kevin Newton 00c32f606a [PRISM] Do not send numbered parameters into eval 2024-03-13 19:01:43 -04:00
Kevin Newton 2f8cbd6431 [PRISM] Handle ambiguous_param0 for it and numbered parameters 2024-03-13 19:01:33 -04:00
Kevin Newton 7c9e6eab89 Handle nth ref too big 2024-03-13 19:01:21 -04:00
Peter Zhu 42bfbe9aa6 Remove unused size_pool_edge_names 2024-03-13 14:50:44 -04:00
Burdette Lamar 76f9cfd0b9
[DOC] Array doc (#10199) 2024-03-13 14:50:18 -04:00
Kevin Newton 2cfcebb2a8 [ruby/prism] Warn for maximum number variables
https://github.com/ruby/prism/commit/2cdbf81c95
2024-03-13 18:35:18 +00:00
Kevin Newton f0b5d0ad54 [PRISM] Turn on more tests 2024-03-13 14:25:03 -04:00
Kevin Newton fa009e392c [PRISM] Static literal strings should be fstrings 2024-03-13 14:24:53 -04:00
Kevin Newton e6a1baad48 [PRISM] Fix compiling duplicated keywords 2024-03-13 14:13:19 -04:00
Koichi ITO a5ac27e9e9 [ruby/prism] Turn on heredocs nested test for `Prism::Translation::Parser`
This PR enables the heredocs_nested.txt that was previously skipped testing.

https://github.com/ruby/prism/commit/9c54f7f10b
2024-03-13 17:35:31 +00:00
Kevin Newton c17f33aa42 [ruby/prism] Only use e suffix for floats if followed by +, -, or digit
https://github.com/ruby/prism/commit/164de502c9
2024-03-13 17:00:03 +00:00
Koichi ITO bf17093a42 [ruby/prism] Fix diagnostic incompatibility for `Prism::Translation::Parser`
In the case of the `**` and `&` ambiguous prefixes, incompatibilities
remained among https://github.com/ruby/prism/issues/2513.

https://github.com/ruby/prism/commit/3b8b231aae
2024-03-13 16:51:37 +00:00
Takashi Kokubun 207b002392
YJIT: Fallback cfunc varg splat for ruby2_keywords (#10226) 2024-03-13 12:22:35 -04:00
Nobuyoshi Nakada c843afbf6f Chomp last punctuations from descriptions for `-h`
The following parts will not be shown for `-h` option.  And not to
reach 80 columns.  Some terminal emulators (Windows command prompt at
least) wrap the cursor to the next line when reaching the rightmost
column, before exceeding.
2024-03-14 01:19:57 +09:00
Kevin Newton a05dfbd405
[PRISM] Remove ssize_t definition from prism 2024-03-13 12:06:48 -04:00
Kevin Newton 4dd9602c6f [ruby/prism] Remove ssize_t usage
https://github.com/ruby/prism/commit/64c4f1268b
2024-03-13 16:06:13 +00:00
Kevin Newton 572e791567 [ruby/prism] FSL follow-up
https://github.com/ruby/prism/commit/097fd2a54f
2024-03-13 16:05:46 +00:00
Jean Boussier 53a77d9b90 [ruby/prism] Change `frozen_string_literal` to be a tri-state
An explicit `false` is not equivalent to the comment being missing,
because the default can be switched with a runtime flag:

```bash
$ ruby --enable-frozen-string-literal -e 'p "foo".frozen?'
true
```

https://github.com/ruby/prism/commit/4660f58775
2024-03-13 16:03:24 +00:00
Koichi ITO 0f076fa520 [ruby/prism] Fix an AST and token incompatibility for `Prism::Translation::Parser`
This PR fixes an AST and token incompatibility between Parser gem and `Prism::Translation::Parser`
for empty xstring literal.

## Parser gem (Expected)

```console
$ bundle exec ruby -Ilib -rparser/ruby33 -ve \
'buf = Parser::Source::Buffer.new("/tmp/s.rb"); buf.source = "``"; p Parser::Ruby33.new.tokenize(buf)'
ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22]
[s(:xstr), [], [[:tXSTRING_BEG, ["`", #<Parser::Source::Range /tmp/s.rb 0...1>]],
[:tSTRING_END, ["`", #<Parser::Source::Range /tmp/s.rb 1...2>]]]]
```

## `Prism::Translation::Parser` (Actual)

Previously, the AST and tokens returned by the Parser gem were different:

```console
$ bunele exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \
'buf = Parser::Source::Buffer.new("/tmp/s.rb"); buf.source = "``"; p Prism::Translation::Parser33.new.tokenize(buf)'
ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22]
[s(:xstr, s(:str, "")), [], [[:tBACK_REF2, ["`", #<Parser::Source::Range /tmp/s.rb 0...1>]],
[:tSTRING_END, ["`", #<Parser::Source::Range /tmp/s.rb 1...2>]]]]
```

After this correction, the AST and tokens returned by the Parser gem are the same:

```console
$ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \
'buf = Parser::Source::Buffer.new("/tmp/s.rb"); buf.source = "``"; p Prism::Translation::Parser33.new.tokenize(buf)'
ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22]
[s(:xstr), [], [[:tXSTRING_BEG, ["`", #<Parser::Source::Range /tmp/s.rb 0...1>]],
[:tSTRING_END, ["`", #<Parser::Source::Range /tmp/s.rb 1...2>]]]]
```

https://github.com/ruby/prism/commit/4ac89dcbb5
2024-03-13 16:02:10 +00:00