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

87526 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 3146cbbbc4
Dont't warn reline called from irb, reline is already declared at irb gemspec 2024-09-13 13:19:31 +09:00
Yusuke Endoh 6ae05584bd [ruby/net-http] Prevent warnings
```
/home/chkbuild/chkbuild/tmp/build/20240913T003003Z/ruby/test/net/http/utils.rb:32: warning: assigned but unused variable - e
/home/chkbuild/chkbuild/tmp/build/20240913T003003Z/ruby/test/net/http/utils.rb:61: warning: assigned but unused variable - version
/home/chkbuild/chkbuild/tmp/build/20240913T003003Z/ruby/test/net/http/utils.rb:124: warning: method redefined; discarding old query
```

https://github.com/ruby/net-http/commit/6f818346ce
2024-09-13 02:39:11 +00:00
Yusuke Endoh 5e3f1b6a6d Prevent a warning: assigned but unused variable - exp_events 2024-09-13 11:34:20 +09:00
Yusuke Endoh d1d0c50c9d Prevent a warning: assigned but unused variable - t0 2024-09-13 11:32:51 +09:00
Nobuyoshi Nakada d80a81c152
Constify `struct getpwnam_r_args::login` 2024-09-13 09:28:51 +09:00
Peter Zhu 0fc8422a05 Move checks for heap traversal to rb_gc_mark_weak
If we are during heap traversal, we don't want to call rb_gc_impl_mark_weak.
This commit moves that check from rb_gc_impl_mark_weak to rb_gc_mark_weak.
2024-09-12 16:03:28 -04:00
Peter Zhu 92b7b78e06 Assert that we are during GC when marking 2024-09-12 16:03:28 -04:00
Peter Zhu 661f64e876 Add variable objspace in RB_GC_MARK_OR_TRAVERSE 2024-09-12 16:03:28 -04:00
Peter Zhu 606db2c423 Move special const checks to rb_gc_mark_weak 2024-09-12 16:03:28 -04:00
Kevin Newton 2d495300e2
[PRISM] Fix up pm_compile_branch_condition issue with single insn iseqs 2024-09-12 15:49:44 -04:00
Burdette Lamar 0960c8aacd
[DOC] Tweaks for Array#fetch_values (#11603) 2024-09-12 15:19:20 -04:00
Burdette Lamar ce5fd35b35
[DOC] Tweaks for Array#fetch (#11602) 2024-09-12 15:18:56 -04:00
Kevin Newton 05e02783a5
[PRISM] Ignore test_parse_directory if error is nil 2024-09-12 15:07:04 -04:00
Kevin Newton 9c461cd125 [PRISM] Check error type for parsing directory 2024-09-12 13:43:04 -04:00
Kevin Newton 38ba15beed [ruby/prism] Check errno for parsing directory
https://github.com/ruby/prism/commit/d68ea29d04
2024-09-12 13:43:04 -04:00
Kevin Newton ca61729fa7 Fix opening multibyte character filepath on Windows 2024-09-12 13:43:04 -04:00
Kevin Newton d4af38ec9d Fix FILE_SHARE_* permissions for Windows in read_entire_file 2024-09-12 13:43:04 -04:00
Kevin Newton d5232fd7ae Temporarily exclude some TestRubyOptions test for parse.y
The description has been updated when running with Prism to have
+PRISM, which means that tests asserting against the description
when running with --parser=parse.y will be incorrect if the
subprocess ends up using Prism. We need to fix these tests, but
we are currently disabling them in order to get this over the line.
2024-09-12 13:43:04 -04:00
Kevin Newton f59b908e47 [PRISM] Omit some TestAST tests when Prism is enabled 2024-09-12 13:43:04 -04:00
Kevin Newton d4ab1e4482 [PRISM] Move compile scope node to its own function 2024-09-12 13:43:04 -04:00
Kevin Newton c4b43692db [PRISM] Move case node compilation into its own function 2024-09-12 13:43:04 -04:00
Kevin Newton ea2af5782d Switch the default parser from parse.y to Prism
This commit switches the default parser to Prism. There are a
couple of additional changes related to this that are a part of
this as well to make this happen.

* Switch the default parser in parse.h
* Remove the Prism-specific workflow and add a parse.y-specific
  workflow to CI so that it continues to be tested
* Update a few test exclusions since Prism has the correct
  behavior but parse.y doesn't per
  https://bugs.ruby-lang.org/issues/20504.
* Skips a couple of tests on RBS which are failing because they
  are using RubyVM::AbstractSyntaxTree.of.

Fixes [Feature #20564]
2024-09-12 13:43:04 -04:00
Jeremy Evans f2919bd11c
Add error checking to readdir, telldir, and closedir calls in dir.c
Raise SystemCallError exception when these functions return an error.

This changes behavior for the following case (found by the tests):

```ruby
dir1 = Dir.new('..')
dir2 = Dir.for_fd(dir1.fileno)
dir1.close
dir2.close
```

The above code is basically broken, as `dir1.close` closed the file
descriptor.  The subsequent `dir2.close` call is undefined behavior.
When run in isolation, it raises Errno::EBADF after the change, but
if another thread opens a file descriptor between the `dir1.close`
and `dir2.close` calls, the `dir2.close` call could close the file
descriptor opened by the other thread.  Raising an exception is much
better in this case as it makes it obvious there is a bug in the code.

For the readdir check, since the GVL has already been released,
reacquire it rb_thread_call_with_gvl if an exception needs to be
raised.

Due to the number of closedir calls, this adds static close_dir_data
and check_closedir functions.  The close_dir_data takes a
struct dir_data * and handles setting the dir entry to NULL regardless
of failure.

Fixes [Bug #20586]

Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com>
2024-09-12 10:04:10 -07:00
Kevin Newton 15135030e5 [ruby/prism] Do not warn \r in shebang on windows
https://github.com/ruby/prism/commit/e8c862ca1f
2024-09-12 15:50:34 +00:00
tomoya ishida a542479a75 [ruby/irb] Remove KEYWORD_ALIASES which handled special alias name
of irb_break irb_catch and irb_next command
(https://github.com/ruby/irb/pull/1004)

* Remove KEYWORD_ALIASES which handled special alias name of irb_break irb_catch and irb_next command

* Remove unused instance variable user_aliases

Co-authored-by: Stan Lo <stan001212@gmail.com>

---------

https://github.com/ruby/irb/commit/f256d7899f

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-09-12 15:04:37 +00:00
Nobuyoshi Nakada fcb058309b Accept version range
Single `Integer` argument means an exact match to the major version.
2024-09-12 23:47:34 +09:00
BurdetteLamar d8aa8f4184 Related for Array#eql? 2024-09-12 10:33:56 -04:00
BurdetteLamar c147e43b4f [DOC] Related for Array#empty? 2024-09-12 10:32:56 -04:00
BurdetteLamar 471d3950e6 [DOC] Tweaks for Array#each_index 2024-09-12 10:32:18 -04:00
Jeremy Evans ad761ad2d0 Release GVL for get{pwnam,pwuid,grgid,grnam}_r calls in process.c
Do not release GVL around get{pwuid,pwnam,grgid,grnam} calls,
as doing so is not thread-safe.  Another C extension could have
a concurrent call, and derefencing the returned pointer from
these calls could result in a segfault.

Have rb_home_dir_of call rb_getpwdirnam_for_login if available,
so it can use getpwnam_r and release GVL in a thread-safe manner.

This is related to GVL releasing work in [Bug #20587].
2024-09-12 07:24:02 -07:00
Peter Zhu b10500b72b Assume VM is locked in rb_vm_ci_free
The GC always locks the VM, so we don't need to lock it in rb_vm_ci_free.
2024-09-12 10:15:25 -04:00
ydah f47c057c32 Remove unnecessary file 2024-09-12 21:06:16 +09:00
ydah 885cf350de Lrama v0.6.10 2024-09-12 21:06:16 +09:00
Hiroshi SHIBATA 2a1962fc4a Warn missing irb cases 2024-09-12 16:28:02 +09:00
Hiroshi SHIBATA 86fcfcb3c0 Fixed ensure scope 2024-09-12 16:28:02 +09:00
Hiroshi SHIBATA 6c9f0be647 Don't use instance variable 2024-09-12 16:28:02 +09:00
Hiroshi SHIBATA ee064d1cb2 Back to Bundler.ui and Bundler::Definition.no_lock 2024-09-12 16:28:02 +09:00
Hiroshi SHIBATA 754e15f4d0 Support bundler/inline mode 2024-09-12 16:28:02 +09:00
Hiroshi SHIBATA 70c6613781 Use better resolution by Bundler at force_activate 2024-09-12 16:28:02 +09:00
Luke Gruber 5d358b660d Fix issue with super and forwarding arguments in prism_compile.c
Fixes [Bug #20720]
2024-09-11 16:41:46 -04:00
Kevin Newton d4d6f1de83 [ruby/prism] UTF-8 characters in file name
https://github.com/ruby/prism/commit/487f0ffe78
2024-09-11 19:17:12 +00:00
David Rodríguez 12d7ead043 [rubygems/rubygems] Small simplification in Definition class
https://github.com/rubygems/rubygems/commit/03ddfd7610

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2024-09-11 18:14:50 +00:00
David Rodríguez 364cc95897 [rubygems/rubygems] Uncomment and possibly fix spec on JRuby
This was commented out almost 10 years ago, but I think it passes now!

https://github.com/rubygems/rubygems/commit/4a6b1aba3c
2024-09-11 18:14:36 +00:00
John Meade efc77d535b [ruby/psych] Ensure strings with only underscores are not processed as Integer
A string similar to "0x____" should be treated as a string.
Currently it is processed as an Integer.

This alters the regex specified by http://yaml.org/type/int.html
to ensure at least one numerical symbol is present in the string
before converting to Integer.

https://github.com/ruby/psych/commit/81479b203e
2024-09-11 17:19:18 +00:00
BurdetteLamar 818e20359f [DOC] Tweaks for Array#each 2024-09-11 13:15:41 -04:00
Burdette Lamar 18fb11aaa4
[DOC] Tweaks for Array#difference (#11593) 2024-09-11 13:14:41 -04:00
BurdetteLamar c7faffd1d6 [DOC] Tweaks for Array#drop_while 2024-09-11 13:14:08 -04:00
Kevin Newton 1be9a99837 [ruby/prism] Add a flag for arguments that contain forwarding
https://github.com/ruby/prism/commit/ebd2889bee
2024-09-11 16:35:10 +00:00
Kevin Newton 886fc69b1c [ruby/prism] Parse tempfile
https://github.com/ruby/prism/commit/31154a389a
2024-09-11 15:39:22 +00:00
Peter Zhu 7facf23232 [DOC] Related for Array#compact 2024-09-11 08:49:10 -04:00