summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-27[ruby/irb] Add a comment about Rails' patch onStan Lo
Workspace#filter_backtrace (https://github.com/ruby/irb/pull/526) * Add a comment about Rails' patch on Workspace#filter_backtrace * Update lib/irb/workspace.rb Co-authored-by: Sorah Fukumori <sora134@gmail.com> --------- https://github.com/ruby/irb/commit/9443d911fc Co-authored-by: Sorah Fukumori <sora134@gmail.com>
2023-02-27[ruby/irb] Provide more useful message whenStan Lo
`IRB::Inspector#inspect_value` errors (https://github.com/ruby/irb/pull/511) **Before** ``` irb(main):001:0> c = Cat.new "foo" (Object doesn't support #inspect) => ``` **After** ``` irb(main):001:0> c = Cat.new "foo" An error occurred when inspecting the object: #<NoMethodError: undefined method `is_a?' for foo:Cat if obj.is_a?(String) ^^^^^^> Result of Kernel#inspect: #<Cat:0x0000000109090d80 @name="foo"> => ```
2023-02-27[ruby/reline] Fix wrong indent number in prompt. whole_lines hastomoya ishida
duplicated line. (https://github.com/ruby/reline/pull/460) * whole_lines should consider prev_line_index, and must not duplicate last_line * Add test for lines passed to dynamic prompt proc * Refactor whole_lines parameters used in test helper * Remove whole_line's arguments
2023-02-27[StepSecurity] ci: Harden GitHub ActionsStepSecurity Bot
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Notes: Merged: https://github.com/ruby/ruby/pull/7390
2023-02-27Ignore test case for Kernel and IO methodsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Prefer to use File.foreach instead of IO.foreachHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Prefer to use File.binwrite instead of IO.binwriteHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Prefer to use File.binread instead of IO.binreadHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Prefer to use File.readlines instead of IO.readlinesHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Rename job and workflow namesHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7388
2023-02-27Use matrix strategies each languageHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7388
2023-02-27Merge codeql-config into codeql-analysisHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7388
2023-02-27[ruby/reline] Fix the cause of test_yamatanooroti randomly failingtomoya ishida
(https://github.com/ruby/reline/pull/474) * Add repeated input-delete test that fails on HEAD * Use raw mode while readmultiline
2023-02-27Update bundled gems list at 2023-02-27git
2023-02-27Bump github/codeql-action from 2.2.4 to 2.2.5dependabot[bot]
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.4 to 2.2.5. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/17573ee1cc1b9d061760f3a006fc4aac4f944fd5...32dc499307d133bb5085bae78498c0ac2cf762d5) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Notes: Merged: https://github.com/ruby/ruby/pull/7386
2023-02-27[ruby/tempfile] Fix inconsistency in doc of Tempfile.createSven Schwyn
https://github.com/ruby/tempfile/commit/3f96b2ed29
2023-02-27Add all-ruby-quine as a sample codeYusuke Endoh
This sample code works on all release versions of Ruby, from Ruby 0.49. Notes: Merged: https://github.com/ruby/ruby/pull/7380
2023-02-27Symbol#end_with? accepts Strings onlyAdam Daniels
Regular expressions are not supported (same as String#end_with?). Notes: Merged: https://github.com/ruby/ruby/pull/7384
2023-02-26reuse open(2) from rb_file_load_ok on POSIX-like systemEric Wong
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.
2023-02-26[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/127) https://github.com/ruby/net-http/commit/07b2b88ef5
2023-02-26Fix autoconf RUBY_STACK_GROW_DIRECTION on ARM devicesBen Hamilton
Notes: Merged: https://github.com/ruby/ruby/pull/7373
2023-02-26Adjust `else` style to be consistent in each files [ci skip]Nobuyoshi Nakada
2023-02-25[ruby/irb] Remove unused Structima1zumi
(https://github.com/ruby/irb/pull/522) https://github.com/ruby/irb/commit/97dae166ae
2023-02-25Prefer RB_NUM2LONG for string length. (#7379)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-02-25[ruby/stringio] Remove (newly unneeded) remarks about aliasesBurdetteLamar
https://github.com/ruby/stringio/commit/60bb320477
2023-02-25Assigning `nil` to fiber storage deletes the association. (#7378)Samuel Williams
Also avoid allocations when looking up `Fiber#storage` if not needed. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-02-25Add `IO::Buffer.string` for efficient string creation. (#7364)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-02-24YJIT: Generate Block::entry_exit with block entry PCAlan Wu
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 Notes: Merged: https://github.com/ruby/ruby/pull/7374 Merged-By: XrXr
2023-02-24[ci skip] Add note in gc.c about ambiguous casePeter Zhu
2023-02-24Fix incorrect line numbers in GC hookPeter Zhu
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] Notes: Merged: https://github.com/ruby/ruby/pull/7357
2023-02-24Fix RubyVM::CExpr#inspectPeter Zhu
@__LINE__ can be nil which causes the inspect method to fail. Notes: Merged: https://github.com/ruby/ruby/pull/7357
2023-02-24[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/126) https://github.com/ruby/net-http/commit/4700d0660b
2023-02-24YJIT: Use enum for expressing type diff (#7370)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2023-02-24YJIT: Compress TempMapping (#7368)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2023-02-24[ruby/irb] Cleanup completion testsStan Lo
(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
2023-02-24[ruby/set] Set#merge does not take keyword arguments as a HashAkinori MUSHA
https://github.com/ruby/set/commit/ca1c9532a9
2023-02-24[ruby/set] Set#merge takes many enumerable objects like Hash#merge! doesAkinori MUSHA
https://github.com/ruby/set/commit/becaca994d
2023-02-24Add information about runirb in make helpKaíque Kandy Koga
Notes: Merged: https://github.com/ruby/ruby/pull/5971
2023-02-23Fix a warning on typedefTakashi Kokubun
../gc.c:13317:1: warning: ‘typedef’ is not at beginning of declaration [-Wold-style-declaration] 13317 | } typedef weakkeymap_entry_t; | ^
2023-02-23YJIT: Trivial fixes in codegen.rsTakashi Kokubun
2023-02-23YJIT: Skip type checks on splat args and expandarray if possible (#7363)Takashi Kokubun
YJIT: Skip type checks on splat args and expandarray if possible Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2023-02-23YJIT: Add `make yjit-smoke-test` [ci skip]Alan Wu
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. Notes: Merged: https://github.com/ruby/ruby/pull/7365
2023-02-23[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/125) https://github.com/ruby/net-http/commit/2ea20380fc
2023-02-23Implement ObjectSpace::WeakKeyMap basic allocatorJean Boussier
[Feature #18498] Notes: Merged: https://github.com/ruby/ruby/pull/5570
2023-02-23[rubygems/rubygems] lint fix againMercedes Bernard
https://github.com/rubygems/rubygems/commit/118d28ad27
2023-02-23[rubygems/rubygems] lint fixMercedes Bernard
https://github.com/rubygems/rubygems/commit/de3b69f1a7
2023-02-23[rubygems/rubygems] add safe_load_marshal for gem::version and gem::specMercedes Bernard
https://github.com/rubygems/rubygems/commit/2ea2ead1b3
2023-02-23[rubygems/rubygems] test Bundler::Fetcher that error raised when attempting ↵Mercedes Bernard
load unexpected class https://github.com/rubygems/rubygems/commit/795e796a9e
2023-02-23[rubygems/rubygems] test rubygems_integration that error raised when ↵Mercedes Bernard
attempting load unexpected class https://github.com/rubygems/rubygems/commit/9798718b3b
2023-02-23[rubygems/rubygems] add test for private load_marshal methodMercedes Bernard
https://github.com/rubygems/rubygems/commit/3a772125b8