summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* thread_pthread.c: trigger THREAD_EVENT_READY when going throuhg the fast path.Jean Boussier2022-06-071-4/+4
|
* * 2022-06-08 [ci skip]git2022-06-081-1/+1
|
* Add special-case code for the String unary plus operator (#5982)Noah Gibbs2022-06-074-0/+69
|
* [rubygems/rubygems] Remove unnecessary string concatenationDaniel Berger2022-06-071-3/+2
| | | | https://github.com/rubygems/rubygems/commit/81ccb3ab89
* Remove while loop over heap_preparePeter Zhu2022-06-071-8/+52
| | | | | | | Having a while loop over `heap_prepare` makes the GC logic difficult to understand (it is difficult to understand when and why `heap_prepare` yields a free page). It is also a source of bugs and can cause an infinite loop if `heap_page` never yields a free page.
* [rubygems/rubygems] Relax performance spec limitDavid Rodríguez2022-06-071-1/+1
| | | | https://github.com/rubygems/rubygems/commit/eab417d0ce
* Refactor TestThreadInstrumentation to investigate CI flakinessJean Boussier2022-06-071-10/+24
| | | | | | | | | | `test_thread_instrumentation_fork_safe` has been failing occasionaly on Ubuntu and Arch. At this stage we're not sure why, all we know is that the child exit with status 1. I suspect that something entirely unrelated cause the forked children to fail on exit, so by using `exit!(0)` and doing assertions in the parent I hope to be resilient to that.
* [ruby/error_highlight] Use Exception#detailed_message instead of overriding ↵Yusuke Endoh2022-06-072-17/+43
| | | | | | | | | #message (https://github.com/ruby/error_highlight/pull/24) See https://bugs.ruby-lang.org/issues/18564. Ref: https://github.com/ruby/did_you_mean/pull/177 https://github.com/ruby/error_highlight/commit/671b7c61b2
* Manually merged https://github.com/ruby/did_you_mean/pull/177Hiroshi SHIBATA2022-06-079-57/+98
|
* Revert "error.c: Let Exception#inspect inspect its message"Yusuke Endoh2022-06-074-18/+3
| | | | This reverts commit 9d927204e7b86eb00bfd07a060a6383139edf741.
* [ruby/rdoc] [DOC] Undocument internal constants [ci skip]Nobuyoshi Nakada2022-06-071-2/+2
| | | | https://github.com/ruby/rdoc/commit/6d7bf24bb8
* error.c: Let Exception#inspect inspect its messageYusuke Endoh2022-06-074-3/+18
| | | | | | | | | | | | ... only when the message string has a newline. `p StandardError.new("foo\nbar")` now prints `#<StandardError: "foo\nbar">' instead of: #<StandardError: bar> [Bug #18170]
* [ruby/rdoc] Allow boolean arguments to `rb_attr` and `rb_define_attr`Nobuyoshi Nakada2022-06-072-78/+32
| | | | | | | | | | Currently only literal `0` and `1` are accepted as `read`/`write` flags. This patch allows other boolean arguments, C macros (`FALSE`/`TRUE`), Ruby `VALUE`s (`Qfalse`/`Qtrue`), and C99 `bool`s (`false`/`true`), as well. https://github.com/ruby/rdoc/commit/169dc02e3c
* .github/workflows/compilers.yml: annocheck: Fix a linker flag to pass MJIT ↵Jun Aruga2022-06-071-8/+2
| | | | | | | | | | tests. Set the linker flag `-Wl,-z,now` properly. Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Fixes [Bug #18781]
* Ignore invalid escapes in regexp commentsJeremy Evans2022-06-063-19/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Invalid escapes are handled at multiple levels. The first level is in parse.y, so skip invalid unicode escape checks for regexps in parse.y. Make rb_reg_preprocess and unescape_nonascii accept the regexp options. In unescape_nonascii, if the regexp is an extended regexp, when "#" is encountered, ignore all characters until the end of line or end of regexp. Unfortunately, in extended regexps, you can use "#" as a non-comment character inside a character class, so also parse "[" and "]" specially for extended regexps, and only skip comments if "#" is not inside a character class. Handle nested character classes as well. This issue doesn't just affect extended regexps, it also affects "(#?" comments inside all regexps. So for those comments, scan until trailing ")" and ignore content inside. I'm not sure if there are other corner cases not handled. A better fix would be to redesign the regexp parser so that it unescaped during parsing instead of before parsing, so you already know the current parsing state. Fixes [Bug #18294] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Fix Module#const_source_location for autoload constants with direct requiresJeremy Evans2022-06-062-2/+22
| | | | | | | | | | If an autoload exists for a constant, but the path for the autoload was required, const_source_location would return [false, 0] instead of the actual file and line. This fixes it by setting the appropriate file and line in rb_const_set, and saving the file and line in const_tbl_update before they get reset by current_autoload_data. Fixes [Bug #18624]
* Use bindgen to import Ruby constants wherever possible. (#5943)Noah Gibbs2022-06-065-60/+93
| | | | Constants that can't be imported via bindgen should have a comment saying why not.
* Fix Range#cover? returning true for beginless ranges of different typesJeremy Evans2022-06-062-1/+82
| | | | | | | | | | | | | Previously `(2..).cover?("2"..)` was false, but `(..2).cover?(.."2")` was true. This changes it so both are false, treating beginless ranges the same as endless ranges in regards to type checks. This also adds documentation to #cover? to describe behavior with beginless and endless ranges, testing each documentation example, which is how this bug was found. Fixes [Bug #18155]
* Add Module#undefined_instance_methodsJeremy Evans2022-06-065-0/+38
| | | | | Implements [Feature #12655] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* [ruby/fileutils] [DOC] Enhanced RDoc for FileUtils ↵Burdette Lamar2022-06-071-62/+142
| | | | | | | | | | | | | (https://github.com/ruby/fileutils/pull/78) Treats: ::rm ::rm_f ::rm_r ::rm_rf ::remove_entry_secure https://github.com/ruby/fileutils/commit/ce2a438d75
* * 2022-06-07 [ci skip]git2022-06-071-1/+1
|
* [ruby/open-uri] [DOC] Fix markup for `URI.open`Alexander Ilyin2022-06-071-1/+1
| | | | | | * Add missing slash. https://github.com/ruby/open-uri/commit/40023e63da
* [ruby/rdoc] Use runnable command as DUMMY_PAGERNobuyoshi Nakada2022-06-061-1/+6
| | | | https://github.com/ruby/rdoc/commit/fec1ab2e41
* [rubygems/rubygems] Unify loading `Gem::Requirement`David Rodríguez2022-06-063-3/+1
| | | | | | | | | | | | | It was being explicitly required from `Gem::Specification` but also a strange autoload was set for it at `Gem::Version`. The autoload was non standard because it should've been done in the `Gem` module, not in `Gem::Specification`, since that's where the constant is expected to get defined. Doing this might get deprecated in the future, and it was not being effective anyways due to the explicit require. Unify everything with an `autoload` at the right place. https://github.com/rubygems/rubygems/commit/174ea3e24c
* debug is the bundled gems, not default gemsHiroshi SHIBATA2022-06-061-1/+1
|
* [ruby/cgi] jruby supportPavel Rosický2022-06-062-4/+16
| | | | https://github.com/ruby/cgi/commit/93326fb622
* Use `sleep 0.5` for tests of GVL instrumentation APIYusuke Endoh2022-06-061-2/+2
| | | | | | | | | | | | | The tests fail randomly on some platforms. http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20220605T213004Z.fail.html.gz http://rubyci.s3.amazonaws.com/arch/ruby-master/log/20220605T210003Z.fail.html.gz ``` [15737/21701] TestThreadInstrumentation#test_thread_instrumentation_fork_safe/home/chkbuild/chkbuild/tmp/build/20220605T213004Z/ruby/tool/lib/test/unit/assertions.rb:109:in `assert': Expected 0 to be nonzero?. (Test::Unit::AssertionFailedError) ``` The failures seem to depend on context switches. I suspect `sleep 0.05` is too short, so this change tries to extend the wait time.
* Fix a typo [ci skip]Kazuhiro NISHIYAMA2022-06-061-1/+1
|
* * 2022-06-06 [ci skip]git2022-06-061-1/+1
|
* Remove useless assignment always overriddenNobuyoshi Nakada2022-06-061-1/+0
|
* Export RbConfig::CONFIG["COROUTINE_TYPE"]nick evans2022-06-061-0/+1
| | | | | | | | THREAD_MODEL is exported already, so this matches that. Exporting this is simpler than inspecting configure_args and arch and matching that up with a specific configure.ac. Fix GH-5976
* * 2022-06-05 [ci skip]git2022-06-051-1/+1
|
* Use RBOOLNobuyoshi Nakada2022-06-051-6/+1
|
* [ruby/rdoc] Use command array form of `IO.popen` alwaysNobuyoshi Nakada2022-06-041-46/+4
| | | | | | So that an exception raises by non-existent command, not via shell. https://github.com/ruby/rdoc/commit/fd94dce69d
* [ruby/rdoc] Make all documents at the top level `extra_rdoc_files` [ci skip]Nobuyoshi Nakada2022-06-041-12/+1
| | | | https://github.com/ruby/rdoc/commit/6b1a011243
* [ruby/rdoc] Remove `RDoc::RI::Driver#in_path?`Nobuyoshi Nakada2022-06-042-28/+0
| | | | https://github.com/ruby/rdoc/commit/83051403d6
* [ruby/rdoc] Enable pager testsNobuyoshi Nakada2022-06-041-5/+3
| | | | https://github.com/ruby/rdoc/commit/ce63794fde
* [ruby/rdoc] Stop checking if pager command foundNobuyoshi Nakada2022-06-041-4/+0
| | | | | | `IO.popen` does that job. https://github.com/ruby/rdoc/commit/3bbbc5ac84
* [ruby/rdoc] Remove never used win32consoleNobuyoshi Nakada2022-06-041-5/+0
| | | | https://github.com/ruby/rdoc/commit/47a1aef447
* * 2022-06-04 [ci skip]git2022-06-041-1/+1
|
* Prevent printing crash report in a loopAlan Wu2022-06-031-0/+11
| | | | | | | | | | | In the event that we are crashing due to a corrupt Ruby stack, we might re-enter rb_vm_bugreport() due to failed assertions in rb_backtrace_print_as_bugreport() or SDR(). In these cases we were printing the bug report ad infinitum with unbounded recusion. I seem to run into this every once in a while and the amount of log it prints out is pretty distracting. On CI environments it makes the log output unnecessarily big. Let's fix this.
* [Feature #18339] GVL Instrumentation APIJean Boussier2022-06-037-1/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ref: https://bugs.ruby-lang.org/issues/18339 Design: - This tries to minimize the overhead when no hook is registered. It should only incur an extra unsynchronized boolean check. - The hook list is protected with a read-write lock as to cause contention when some hooks are registered. - The hooks MUST be thread safe, and MUST NOT call into Ruby as they are executed outside the GVL. - It's simply a noop on Windows. API: ``` rb_internal_thread_event_hook_t * rb_internal_thread_add_event_hook(rb_internal_thread_event_callback callback, rb_event_flag_t internal_event, void *user_data); bool rb_internal_thread_remove_event_hook(rb_internal_thread_event_hook_t * hook); ``` You can subscribe to 3 events: - READY: called right before attempting to acquire the GVL - RESUMED: called right after successfully acquiring the GVL - SUSPENDED: called right after releasing the GVL. The hooks MUST be threadsafe, as they are executed outside of the GVL, they also MUST NOT call any Ruby API.
* [ruby/nkf] Constified invariant tablesNobuyoshi Nakada2022-06-031-7/+7
| | | | https://github.com/ruby/nkf/commit/b386ddc11c
* [DOC] Fix documentation of Numeric#div: Complex does not have #divKouhei Yanagita2022-06-031-1/+1
|
* * 2022-06-03 [ci skip]git2022-06-031-1/+1
|
* [DOC] Mention the case to autoload already defined constantNobuyoshi Nakada2022-06-031-0/+8
|
* [DOC] Subjects of `autoload` are not restricted to modulesNobuyoshi Nakada2022-06-031-4/+4
|
* [rubygems/rubygems] Remove redundant bitwise ANDDavid Rodríguez2022-06-021-1/+1
| | | | https://github.com/rubygems/rubygems/commit/a20bac7924
* [rubygems/rubygems] Add test cases from SHA1 RFC and improve test failure ↵David Rodríguez2022-06-021-2/+9
| | | | | | | | | | message I found that the current test cases did not cover the bitwise AND performed on modified words after each iteration (https://github.com/rubygems/rubygems/blob/7e5765a66c9fe5187b167f619f34db5db121f2df/bundler/lib/bundler/digest.rb#L50) https://github.com/rubygems/rubygems/commit/c8de819fee
* [rubygems/rubygems] Remove leftover debugging putsDavid Rodríguez2022-06-021-1/+0
| | | | https://github.com/rubygems/rubygems/commit/7c6f15040d