summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Symbol#end_with? accepts Strings onlyAdam Daniels2023-02-271-1/+1
| | | | Regular expressions are not supported (same as String#end_with?).
* reuse open(2) from rb_file_load_ok on POSIX-like systemEric Wong2023-02-266-27/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When loading Ruby source files, we can save the result of successful opens as open(2)/openat(2) are a fairly expensive syscalls. This also avoids a time-of-check-to-time-of-use (TOCTTOU) problem. This reduces open(2) syscalls during `require'; but should be most apparent when users have a small $LOAD_PATH. Users with large $LOAD_PATH will benefit less since there'll be more open(2) failures due to ENOENT. With `strace -c -e openat ruby -e exit' under Linux, this results in a ~14% reduction of openat(2) syscalls (glibc uses openat(2) to implement open(2)). % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 0.00 0.000000 0 296 110 openat 0.00 0.000000 0 254 110 openat Additionally, the introduction of `struct ruby_file_load_state' may make future optimizations more apparent. This change cannot benefit binary (.so) loading since the dlopen(3) API requires a filename and I'm not aware of an alternative that takes a pre-existing FD. In typical situations, Ruby source files outnumber the mount of .so files.
* [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar2023-02-261-30/+35
| | | | | | (https://github.com/ruby/net-http/pull/127) https://github.com/ruby/net-http/commit/07b2b88ef5
* Fix autoconf RUBY_STACK_GROW_DIRECTION on ARM devicesBen Hamilton2023-02-261-1/+1
|
* Adjust `else` style to be consistent in each files [ci skip]Nobuyoshi Nakada2023-02-266-25/+50
|
* [ruby/irb] Remove unused Structima1zumi2023-02-251-2/+0
| | | | | | (https://github.com/ruby/irb/pull/522) https://github.com/ruby/irb/commit/97dae166ae
* Prefer RB_NUM2LONG for string length. (#7379)Samuel Williams2023-02-251-1/+1
|
* [ruby/stringio] Remove (newly unneeded) remarks about aliasesBurdetteLamar2023-02-251-6/+0
| | | | https://github.com/ruby/stringio/commit/60bb320477
* Assigning `nil` to fiber storage deletes the association. (#7378)Samuel Williams2023-02-252-13/+31
| | | Also avoid allocations when looking up `Fiber#storage` if not needed.
* Add `IO::Buffer.string` for efficient string creation. (#7364)Samuel Williams2023-02-252-0/+44
|
* YJIT: Generate Block::entry_exit with block entry PCAlan Wu2023-02-242-2/+43
| | | | | | | | | | | | | | | | Previously, when Block::entry_exit is requested from any instruction that is not the first one in the block, we generated the exit with an incorrect PC. We should always be using the PC for the entry of the block for Block::entry_exit. It was a simple typo. The bug was [introduced][1] while we were refactoring to use the current backend. Later, we had a chance to spot this issue while [preparing][2] to enable unused variable warnings, but didn't spot the issue. Fixes [Bug #19463] [1]: 27fcab995e6dde19deb91dc6e291bdb72100af68 [2]: 31461c7e0eab4963ccc8649ea8ebf27979132c0c
* [ci skip] Add note in gc.c about ambiguous casePeter Zhu2023-02-241-5/+18
|
* Fix incorrect line numbers in GC hookPeter Zhu2023-02-248-10/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the previous instruction is not a leaf instruction, then the PC was incremented before the instruction was ran (meaning the currently executing instruction is actually the previous instruction), so we should not increment the PC otherwise we will calculate the source line for the next instruction. This bug can be reproduced in the following script: ``` require "objspace" ObjectSpace.trace_object_allocations_start a = 1.0 / 0.0 p [ObjectSpace.allocation_sourceline(a), ObjectSpace.allocation_sourcefile(a)] ``` Which outputs: [4, "test.rb"] This is incorrect because the object was allocated on line 10 and not line 4. The behaviour is correct when we use a leaf instruction (e.g. if we replaced `1.0 / 0.0` with `"hello"`), then the output is: [10, "test.rb"]. [Bug #19456]
* Fix RubyVM::CExpr#inspectPeter Zhu2023-02-241-1/+5
| | | | @__LINE__ can be nil which causes the inspect method to fail.
* [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar2023-02-242-34/+55
| | | | | | (https://github.com/ruby/net-http/pull/126) https://github.com/ruby/net-http/commit/4700d0660b
* YJIT: Use enum for expressing type diff (#7370)Takashi Kokubun2023-02-242-65/+59
|
* YJIT: Compress TempMapping (#7368)Takashi Kokubun2023-02-242-2/+47
|
* [ruby/irb] Cleanup completion testsStan Lo2023-02-241-18/+0
| | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/520) * Remove redundant completion test The test case was introduced to guard an old implementation, which relied on `Module#name`. Commit: https://github.com/ruby/irb/commit/8827d182746396dbf4499c2c1c8c0e9bf8375b7c However, the current implementation has avoided calling `Module#name` completely, so the test case is no longer necessary. Commit: https://github.com/ruby/irb/commit/88311ce3c84251e6f420246cd14efc96e00888be * Remove unnecessary pend
* [ruby/set] Set#merge does not take keyword arguments as a HashAkinori MUSHA2023-02-243-2/+6
| | | | https://github.com/ruby/set/commit/ca1c9532a9
* [ruby/set] Set#merge takes many enumerable objects like Hash#merge! doesAkinori MUSHA2023-02-242-8/+19
| | | | https://github.com/ruby/set/commit/becaca994d
* Add information about runirb in make helpKaíque Kandy Koga2023-02-241-0/+1
|
* Fix a warning on typedefTakashi Kokubun2023-02-231-2/+2
| | | | | | ../gc.c:13317:1: warning: ‘typedef’ is not at beginning of declaration [-Wold-style-declaration] 13317 | } typedef weakkeymap_entry_t; | ^
* YJIT: Trivial fixes in codegen.rsTakashi Kokubun2023-02-232-2/+2
|
* YJIT: Skip type checks on splat args and expandarray if possible (#7363)Takashi Kokubun2023-02-231-48/+46
| | | | | YJIT: Skip type checks on splat args and expandarray if possible
* YJIT: Add `make yjit-smoke-test` [ci skip]Alan Wu2023-02-231-0/+9
| | | | | | | | I have this as a shell command and Maxime told me that she finds it useful, too. I tested this on a release build and a dev build. Note I intentional didn't put `$(Q)` in front of everything so `make` echos the command it runs.
* [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar2023-02-231-43/+87
| | | | | | (https://github.com/ruby/net-http/pull/125) https://github.com/ruby/net-http/commit/2ea20380fc
* Implement ObjectSpace::WeakKeyMap basic allocatorJean Boussier2023-02-235-2/+447
| | | | [Feature #18498]
* [rubygems/rubygems] lint fix againMercedes Bernard2023-02-231-1/+1
| | | | https://github.com/rubygems/rubygems/commit/118d28ad27
* [rubygems/rubygems] lint fixMercedes Bernard2023-02-231-7/+7
| | | | https://github.com/rubygems/rubygems/commit/de3b69f1a7
* [rubygems/rubygems] add safe_load_marshal for gem::version and gem::specMercedes Bernard2023-02-231-0/+12
| | | | https://github.com/rubygems/rubygems/commit/2ea2ead1b3
* [rubygems/rubygems] test Bundler::Fetcher that error raised when attempting ↵Mercedes Bernard2023-02-231-0/+30
| | | | | | load unexpected class https://github.com/rubygems/rubygems/commit/795e796a9e
* [rubygems/rubygems] test rubygems_integration that error raised when ↵Mercedes Bernard2023-02-231-0/+11
| | | | | | attempting load unexpected class https://github.com/rubygems/rubygems/commit/9798718b3b
* [rubygems/rubygems] add test for private load_marshal methodMercedes Bernard2023-02-231-0/+5
| | | | https://github.com/rubygems/rubygems/commit/3a772125b8
* [rubygems/rubygems] make Bundler.load_marshal privateMercedes Bernard2023-02-232-8/+8
| | | | https://github.com/rubygems/rubygems/commit/4909d071d2
* [rubygems/rubygems] safe marshal gem specs when inflatingMercedes Bernard2023-02-232-3/+3
| | | | https://github.com/rubygems/rubygems/commit/5c5d0c5350
* [rubygems/rubygems] safe marshal gem versions when fetching Marshal.specs.4.8.gzMercedes Bernard2023-02-232-2/+2
| | | | https://github.com/rubygems/rubygems/commit/23880353c1
* [Bug #19459] Remove unnecessary always-true checks (#7362)Nobuyoshi Nakada2023-02-231-17/+7
| | | | | `length` is a required argument for `IO::Buffer#read` and `IO::Buffer#write` methods, and `argc` is already checked with `rb_check_arity`. Also fix the call-seq of `IO::Buffer#read`.
* Move `dump_machine_register` definitionsNobuyoshi Nakada2023-02-231-19/+10
|
* YJIT: Introduce Opnd::Stack (#7352)Takashi Kokubun2023-02-225-50/+80
|
* * remove trailing spaces. [ci skip]git2023-02-221-1/+1
|
* Make GC faster when RGENGC_CHECK_MODE >= 2Peter Zhu2023-02-221-8/+4
| | | | | | We shouldn't run gc_verify_internal_consistency after every GC step when RGENGC_CHECK_MODE >= 2, only when GC has finished. Running it on every GC step makes it too slow.
* [lldb] Add a print_flags command (#7358)Matt Valentine-House2023-02-222-3/+33
|
* [ruby/net-http] [DOC] Enhanced RDoc for Net:HTTPBurdette Lamar2023-02-221-19/+16
| | | | | | (https://github.com/ruby/net-http/pull/124) https://github.com/ruby/net-http/commit/aaf26b21d6
* Skip failing test on MSWinNobuyoshi Nakada2023-02-221-0/+1
|
* [rubygems/rubygems] Skip extension test on jrubySamuel Giddins2023-02-221-0/+2
| | | | https://github.com/rubygems/rubygems/commit/38ee82c297
* [rubygems/rubygems] Better teardownSamuel Giddins2023-02-221-2/+4
| | | | https://github.com/rubygems/rubygems/commit/5fa0ebf09b
* [rubygems/rubygems] Always join with a stringSamuel Giddins2023-02-222-2/+3
| | | | | | Gem.path_separator can also be a regexp... https://github.com/rubygems/rubygems/commit/7e6e56a5f3
* [rubygems/rubygems] Only update env if var existsSamuel Giddins2023-02-221-2/+2
| | | | | | Will save on an error if it would be nil from an exception happening during that line https://github.com/rubygems/rubygems/commit/d6797a04e9
* [rubygems/rubygems] Nil out Gem.configuration after testsSamuel Giddins2023-02-221-0/+1
| | | | https://github.com/rubygems/rubygems/commit/3135ad91d4
* [rubygems/rubygems] Use assert_raise instead of assert_raisesSamuel Giddins2023-02-221-1/+1
| | | | | | For ruby-core compat https://github.com/rubygems/rubygems/commit/c8f85c91a8