Peter Zhu
6b8078cc03
Don't create empty string for interpolation
...
We don't need to create an empty string for interpolation unless it is
the only element.
For example:
"#{hello} world"
Before:
0000 putobject "" ( 1)[Li]
0002 putself
0003 opt_send_without_block <calldata!mid:hello, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0005 dup
0006 objtostring <calldata!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>
0008 anytostring
0009 putobject " world"
0011 concatstrings 3
0013 leave
After:
0000 putself ( 1)[Li]
0001 opt_send_without_block <calldata!mid:hello, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 dup
0004 objtostring <calldata!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>
0006 anytostring
0007 putobject " world"
0009 concatstrings 2
0011 leave
2024-09-30 09:09:09 -04:00
Nobuyoshi Nakada
637067440f
[Bug #20752 ] Slice of readonly `IO::Buffer` also should be readonly
2024-09-30 20:39:14 +09:00
Yusuke Endoh
b93c51c114
Free a buffer allocated by realpath
...
8350b48cfa
introduced a memory leak bug.
Will fix [Bug #20773 ]
`loop { File.realpath("foo") }` caused memory leak.
2024-09-30 20:35:46 +09:00
Earlopain
5ed67f4826
[ruby/rdoc] Only let browser search through source code until it's
...
expanded
(https://github.com/ruby/rdoc/pull/1181 )
Something that's been bothering me is that while the source code is
not visible by default, the browser still jump to it when searching.
Adding the `visible` property prevents this.
Test it out yourself:
* `bundle exec rdoc`
* open `_site/index.html`
* Search for `NameError`
Before, you will get a match from `load_yaml` source code, after
you only get the match when that methods source code is expanded.
https://github.com/ruby/rdoc/commit/003126cc23
2024-09-30 11:32:45 +00:00
Hiroshi SHIBATA
81d26814be
Update test args with bundled gems. webrick has been removed that targets
2024-09-30 19:10:16 +09:00
Hiroshi SHIBATA
8cd36a6dab
Don't warn the bundled gems that are migrated at Ruby 3.0.
...
We should stop warnings at some point. I decided to that period EOL-ed versions.
ex. In 2024, Ruby 3.0 is EOL. we removed webrick, rexml, rss from warning targets.
2024-09-30 18:53:21 +09:00
Nobuyoshi Nakada
c30a3ed027
Fix the last character index in an assertion
...
Also, when `RUBY_DEBUG` is enabled, objects allocated in shared-gc
fail at `rb_ractor_confirm_belonging`, so assert it always.
2024-09-30 18:17:42 +09:00
ydah
ac2786757e
Use Named Reference
2024-09-30 18:04:41 +09:00
ydah
044e57ed7c
Implement SPLAT NODE keyword locations
2024-09-30 18:04:41 +09:00
卜部昌平
239c1c621e
LLVM 20 begun
...
see also 10c6d6349e
2024-09-30 17:43:56 +09:00
Hiroshi SHIBATA
6abed7eae9
Test with -O3 is flaky now. I disabled it same as before.
2024-09-30 16:20:33 +09:00
David Rodríguez
3a273c4742
[rubygems/rubygems] Fix error when changing a path source to a git source if frozen mode
...
https://github.com/rubygems/rubygems/commit/4c79ab9b2e
2024-09-30 05:09:16 +00:00
David Rodríguez
1e00763688
[rubygems/rubygems] Fix duplicated spec names
...
https://github.com/rubygems/rubygems/commit/26f6600197
2024-09-30 05:09:16 +00:00
Earlopain
7d318c2cb2
[rubygems/rubygems] Fix `stub.activated?` sometimes returning false after activation under bundler
...
Closes https://github.com/rubygems/rubygems/pull/8068
This issue only occurs if the underlying stub is a gem stub:
f56098d8a1/bundler/lib/bundler/stub_specification.rb (L109-L112)
https://github.com/rubygems/rubygems/commit/9b0152b3d5
2024-09-30 05:08:48 +00:00
David Rodríguez
dbe69a466f
[rubygems/rubygems] I _think_ this workaround is no longer necessary
...
https://github.com/rubygems/rubygems/commit/6a76fedfd0
2024-09-30 05:08:25 +00:00
David Rodríguez
060932af98
[rubygems/rubygems] Fix old cache format detection when application is not source controlled
...
https://github.com/rubygems/rubygems/commit/b2adcc0173
2024-09-30 05:08:25 +00:00
David Rodríguez
82f250af45
[rubygems/rubygems] `gem cleanup` no longer needs to reset paths
...
Since `Gem::Uninstaller` no longer changes paths either.
https://github.com/rubygems/rubygems/commit/427059d45f
2024-09-30 05:07:58 +00:00
David Rodríguez
d4ac5c573b
[rubygems/rubygems] Don't add duplicated specs to unresolved specs
...
This could happen when a regular gem shadows a default gem.
https://github.com/rubygems/rubygems/commit/9ef70dd1f7
2024-09-30 05:07:57 +00:00
David Rodríguez
73d60df6e0
[rubygems/rubygems] Don't list duplicated version in `Gem::Specification.reset` warning
...
https://github.com/rubygems/rubygems/commit/e6e3db821f
2024-09-30 05:07:57 +00:00
ydah
1b6c234fec
s/reproducable/reproducible/
2024-09-30 13:04:49 +09:00
Hiroshi SHIBATA
3fe59b04d6
-l option of 7z is unknown switch with the `ubuntu-latest`.
...
https://github.com/ruby/actions/actions/runs/11095032727/job/30823174026#step:3:349
2024-09-30 12:03:02 +09:00
Hiroshi SHIBATA
3a9e48b9a4
Fixed warning condition with LoadError
2024-09-30 11:35:59 +09:00
Nobuyoshi Nakada
28a01e306a
Ruby exception cannot work here
...
Just show error messages then ignore the invalid library.
2024-09-30 10:27:30 +09:00
Burdette Lamar
03ca99c93b
[DOC] Tweaks for Array#hash ( #11704 )
2024-09-29 21:22:43 -04:00
Burdette Lamar
5be11c1d1b
[DOC] Tweaks for Array#first ( #11687 )
2024-09-29 21:21:55 -04:00
Burdette Lamar
116395d315
[DOC] Tweaks for Array#flatten! ( #11689 )
2024-09-29 21:21:26 -04:00
Burdette Lamar
154ec2d242
[DOC] Tweaks for Array#insert ( #11709 )
2024-09-29 21:21:11 -04:00
Lars Kanis
9b4a497456
Fix loading of nonascii script name on Windows
...
Since the prism parser was enabled by default, loading scripts with nonascii characters somewhere in the script path is no longer working.
It only works when the codepage was switched to 65001 (UTF-8).
This patch doesn't change the encoding of __FILE__. It is still in locale encoding.
That's why pm_load_file() is called with UTF-8 script name and pm_parse_file() with locale encoding.
The loading of nonascii script names is part of the test-all, but it doesn't trigger the failure on GHA, since it is using cp 65001.
On other codepages it fails with:
[53/71] TestRubyOptions#test_command_line_progname_nonascii = 0.04 s
1) Failure:
TestRubyOptions#test_command_line_progname_nonascii [C:/Users/Administrator/ruby/test/ruby/test_rubyoptions.rb:1086]:
[ruby-dev:48752] [Bug #10555 ]
pid 1736 exit 1
| C:\Users\Administrator\ruby\ruby.exe: No such file or directory -- �.rb (LoadError)
.
1. [1/2] Assertion for "stdout"
| <["\xFF.rb"]> expected but was
| <[]>.
2. [2/2] Assertion for "stderr"
| <[]> expected but was
| <["C:\\Users\\Administrator\\ruby\\ruby.exe: No such file or directory -- \xFF.rb (LoadError)"]>.
2024-09-29 19:01:18 -04:00
Nobuyoshi Nakada
a0838a3902
Raise fatal error instead of BUG
...
Failures due to the external setting is not a bug of ruby itself.
2024-09-30 00:20:35 +09:00
Nobuyoshi Nakada
5139a574aa
Make directory for shared-GC libraries at build
2024-09-30 00:19:16 +09:00
Nobuyoshi Nakada
9d60480094
CI: Remove `SHARED_GC` compilation
...
It is checked in ubuntu.yml.
2024-09-30 00:03:14 +09:00
Nobuyoshi Nakada
5e466ad3f7
CI: Remove `ENABLE_PATH_CHECK` compilation
...
As `ENABLE_PATH_CHECK` is defaulted to 1 on other than DOSISH and
Cygwin, setting this macro to 1 on Ubuntu changes nothing from the
default. As for `ENABLE_PATH_CHECK=0` tests, we have real CI
platforms already.
2024-09-30 00:03:14 +09:00
Nobuyoshi Nakada
1f6d2e77d9
Remove leading spaces from `LIBPATHFLAG` and `RPATHFLAG`
...
Join with a space in `MakeMakefile#libpathflag` instead.
2024-09-29 23:07:16 +09:00
git
9138b388ee
Update bundled gems list as of 2024-09-29
2024-09-29 13:24:09 +00:00
Nobuyoshi Nakada
52e40aeab6
Bump actions/checkout
2024-09-29 21:38:14 +09:00
Nobuyoshi Nakada
f5d9d9b5f8
win32/sspi: Use `start_with?` to see prefix
2024-09-29 21:00:26 +09:00
Nobuyoshi Nakada
25eb9bded8
win32/sspi: Rafactor pack/unpack
2024-09-29 21:00:26 +09:00
Nobuyoshi Nakada
30230ed9e6
win32/sspi: For Ractor use a constant instead of a class variable
2024-09-29 21:00:26 +09:00
Nobuyoshi Nakada
fc2f196cb8
win32/sspi: Fix missing A suffix in an API constant name
2024-09-29 21:00:26 +09:00
Nobuyoshi Nakada
b7bca0ebdc
win32/sspi: Fix Win32::SSPI::SSPIResult#== with Integer
...
The values of `@@map` are `Symbol`s and `@value` should be an
`Integer` since unpacked as unsigned long, so this comparison should
be false always. Probably comparison with `Symbol` was intended.
2024-09-29 21:00:26 +09:00
Nobuyoshi Nakada
1179c86384
win32/sspi: Already Fixnum has been removed years ago
2024-09-29 21:00:25 +09:00
Nobuyoshi Nakada
65a0795c3f
[DOC] Mention block mode of `String#unpack`
2024-09-29 19:09:59 +09:00
Nobuyoshi Nakada
e7144af750
[DOC] Refine about offset directives
2024-09-29 19:07:16 +09:00
Nobuyoshi Nakada
066ac0fdc2
Expand buffer at once then fill it at once
2024-09-29 18:55:15 +09:00
Nobuyoshi Nakada
3b43585a84
Extract common code from `pack_pack` and `pack_unpack_internal`
2024-09-29 18:45:47 +09:00
Nobuyoshi Nakada
e1889dd7de
Assertions should not have side effects
2024-09-29 11:42:10 +09:00
BurdetteLamar
01ff65af32
[DOC] Tweaks for Array#replace
2024-09-28 21:13:21 -04:00
BurdetteLamar
3986b5fef5
[DOC] Tweaks for Array#include?
2024-09-28 21:12:17 -04:00
BurdetteLamar
d64528c695
[DOC] Tweaks for Array#freeze
2024-09-28 20:59:36 -04:00
Burdette Lamar
5a7b66fa97
[DOC] Tweaks for Array#flatten ( #11688 )
2024-09-28 20:58:14 -04:00