| Age | Commit message (Collapse) | Author |
|
|
|
https://docs.ruby-lang.org/en/master/syntax/literals_rdoc.html#label-25w+and+-25W-3A+String-Array+Literals
> %W allow escape sequences described in Escape Sequences. However the continuation line <newline> is not usable because it is interpreted as the escaped newline described above.
https://github.com/ruby/prism/commit/f5c7460ad5
|
|
|
|
https://github.com/rubygems/rubygems/commit/9b9ba0bf1e
|
|
https://github.com/ruby/optparse/commit/15b2f00b6b
|
|
https://github.com/ruby/optparse/commit/740ffa76c0
|
|
(https://github.com/ruby/optparse/pull/76)
* Enhance to support 'Set' object as an enum
* Add test script for '#make_swithc()'
---------
https://github.com/ruby/optparse/commit/3869000e98
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
Lots of stdlib methods such as Integer#times and Kernel#then use this,
so at least this will make writing tests slightly easier.
|
|
|
|
They're only used when level≠0. Same EP hopping logic as interpreter and
YJIT. Change assert_compiles() to get ISeq by method name since the old
code didn't support methods defined using define_method() which I need
for the new test.
|
|
https://github.com/ruby/io-console/commit/e0398acad4
|
|
It's something we don't expect and might be coming from somewhere
else.
https://github.com/ruby/io-console/commit/c5e47a900c
|
|
This reverts commit https://github.com/ruby/io-console/commit/f0646b2b6ae3.
https://github.com/ruby/io-console/commit/2e0e01263a
|
|
The test sometimes fails with "Expected 2062788 to be < 2000000" because
heap 0 has not been cleared yet by GC. This commit fixes it to run GC
before the assertion to ensure that it does not flake.
|
|
This commit adds an `eval` method to `Namespace` that takes a string and
evaluates the string as Ruby code within the context of that namespace.
For example:
```ruby
n = Namespace.new
n.eval("class TestClass; def hello; 'from namespace'; end; end")
instance = n::TestClass.new
instance.hello # => "from namespace"
```
[Feature #21365]
|
|
Fix https://github.com/ruby/uri/pull/89
https://github.com/ruby/uri/commit/d543c0dafa
|
|
Algorithms implemented only in OpenSSL 3 providers may not have a
corresponding NID. The *_ex() variants have been added in OpenSSL 3.0
to handle such algorithms, by taking algorithm names as a string.
https://github.com/ruby/openssl/commit/e730e457cc
|
|
For algorithms implemented solely in an OpenSSL 3 provider, without an
associated EVP_PKEY_METHOD, EVP_PKEY_id() returns a special value
EVP_PKEY_KEYMGMT.
Let OpenSSL::PKey::PKey#oid raise an exception as necessary.
Update PKey#inspect to include the string returned by
EVP_PKEY_get0_type_name(), if available.
https://github.com/ruby/openssl/commit/bd3e32270e
|
|
Fixes [Bug #21377]
Co-authored-by: zzak <zzak@hey.com>
|
|
As Set is now a core collection class, it should have special inspect
output. Ideally, inspect output should be suitable to eval, similar
to array and hash (assuming the elements are also suitable to eval):
set = Set[1, 2, 3]
eval(set.inspect) == set # should be true
The simplest way to do this is to use the Set[] syntax.
This deliberately does not use any subclass name in the output,
similar to array and hash. It is more important that users know they
are dealing with a set than which subclass:
Class.new(Set)[]
# this does: Set[]
# not: #<Class:0x00000c21c78699e0>[]
This inspect change breaks the power_assert bundled gem tests, so
add power_assert to TEST_BUNDLED_GEMS_ALLOW_FAILURES in the workflows.
Implements [Feature #21389]
|
|
[Bug #17516]
`fork(2)` only leave the calling thread alive in the child.
Because of this forking from the non-main ractor can easily
leave the VM in a corrupted state.
It may be possible in the future to carefully allow forking from non-main
Ractor, but shot term it's preferable to add this restriction.
|
|
There are few legitimate use cases for duplicate keys, and can
in some case be exploited.
Rather to always silently accept them, we should emit a warning,
and in the future require to explictly allow them.
https://github.com/ruby/json/commit/06f00a42e8
|
|
Before the patch:
```
$ ./miniruby -e '[1, 2].inject(:tap)'
-e:1:in '<main>': wrong number of arguments (given 1, expected 0) (ArgumentError)
from -e:1:in 'Enumerable#inject'
from -e:1:in '<main>'
```
After the patch:
```
$ ./miniruby -e '[1, 2].inject(:tap)'
-e:1:in 'Kernel#tap': wrong number of arguments (given 1, expected 0) (ArgumentError)
from -e:1:in 'Enumerable#inject'
from -e:1:in '<main>'
```
Fixes https://bugs.ruby-lang.org/issues/20968#change-113811
|
|
* [Bug #21449] Fix Set#divide{|a,b|} using Union-find structure
Implements Union-find structure with path compression.
Since divide{|a,b|} calls the given block n**2 times in the worst case, there is no need to implement union-by-rank or union-by-size optimization.
* Avoid internal arrays from being modified from block passed to Set#divide
Internal arrays can be modified from yielded block through ObjectSpace.
Freeze readonly array, use ALLOCV_N instead of mutable array.
|
|
|
|
non-existent parent dirs
https://github.com/rubygems/rubygems/commit/4701123601
|
|
If all nodes in the array are safe, then it is safe to avoid
allocation for the positional splat:
```ruby
m(*a, kw: [:a]) # Safe
m(*a, kw: [meth]) # Unsafe
```
This avoids an unnecessary allocation in a Rails method call.
Details: https://github.com/rails/rails/pull/54949/files#r2052645431
|
|
[Bug #21445]
|
|
This was handled correctly in parse.y (NODE_COLON2), but not in
prism. This wasn't caught earlier, because I only added tests for
the optimized case and not the unoptimized case. Add tests for
the unoptimized case.
In code terms:
```ruby
m(*a, kw: lvar::X) # Does not require allocation for *a
m(*a, kw: method()::X) # Requires allocation for *a
```
This commit fixes the second case when prism is used.
|
|
Add methods for setting supported signature algorithms, corresponding
to SSL_CTX_set1_sigalgs_list() and SSL_CTX_set1_client_sigalgs_list(),
respectively.
https://github.com/ruby/openssl/commit/6bbe58c492
Co-authored-by: Markus Jung <markus.jung@vivavis.com>
|
|
It's something we don't expect and might be coming from somewhere
else.
https://github.com/ruby/io-console/commit/f0646b2b6a
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13641
|
|
https://github.com/ruby/ruby/actions/runs/15751511003/job/44397451542?pr=13649
```
1) Failure:
TestLastThread#test_last_thread [/Users/runner/work/ruby/ruby/src/test/-ext-/gvl/test_last_thread.rb:18]:
Expected |1.0 - 1.167141| (0.16714099999999998) to be <= 0.16.
```
|
|
Currently to test Bundler 3 mode we have to actually edit the version
file to simulate we're running a future version. This is inconvenient.
Instead, allow passing an environment variable, `BUNDLER_3_MODE`, to set
the "working mode" Bundler should use.
This can now be set easily by end users to enable them to try out the
changes in the future version and give us feedback.
It's unclear how version auto-switching should work when this
environment variable is set, so the auto-switching feature will be
disabled in that case.
https://github.com/rubygems/rubygems/commit/4e92e9b209
|
|
* `invokebuiltin`
* `invokebuiltin_delegate`
* `invokebuiltin_delegate_leave`
These instructions all call out to a C function, passing EC, self, and
some number of arguments. `invokebuiltin` gets the arguments from the
stack, whereas the `_delegate` instructions use a subset of the locals.
`opt_invokebuiltin_delegate_leave` has a fast path for `leave`, but I'm
not sure we need to do anything special for that here (FWIW YJIT appears
to treat the two delegate instructions the same).
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13238
|
|
Followup: https://github.com/ruby/ruby/pull/13589
This simplify a lot of things, as we no longer need to manually
manage the memory, we can use the Read-Copy-Update pattern and
avoid numerous race conditions.
Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/13626
|
|
Issue a call to rb_vm_opt_getconstant_path() like the interpreter, but
since that allocates the IC, we need to save the PC before calling. Add
FrameState to GetConstPath to get access to the PC.
Notes:
Merged: https://github.com/ruby/ruby/pull/13628
|
|
* `opt_hash_freeze`
* `opt_ary_freeze`
* `opt_str_freeze`
* `opt_str_uminus`
Similar to `opt_neq`, but there are no args for `freeze`
Co-authored-by: ywenc <ywenc@github.com>
Co-authored-by: Max Bernstein <max@bernsteinbear.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/13588
|
|
ruby/ruby#13636
https://github.com/ruby/prism/commit/e13d4f19db
Co-Authored-By: Tim Smith <tsmith84@gmail.com>
|
|
If a previous copy of a gem is already installed, RubyGems will not
reinstall the gem but only recompile its extensions. This seems like a
good idea, but only if the gem is being installed from the registry.
If we are installing a locally built package, then the package should be
completely reinstalled and extensions compiled from the sources in the
locally built package, not from the sources in the previous
installation.
https://github.com/rubygems/rubygems/commit/1c282d98d5
|
|
https://github.com/rubygems/rubygems/commit/9a859078ab
|
|
I don't see any warnings.
https://github.com/rubygems/rubygems/commit/395df777a2
|
|
The `source` field in IO::Buffer can have a String or an IO::Buffer
object, if not nil.
- When the `source` is a String object. The `base` field points to the
memory location of the String content, which can be embedded in
RSTRING, and in that case, GC compaction can move the memory region
along with the String object.
Thus, IO::Buffer needs to pin the `source` object to prevent `base`
pointer from becoming invalid.
- When the `source` is an IO::Buffer, then `base` is a pointer to a
malloced or mmapped memory region, managed by the source IO::Buffer.
In this case, we don't need to pin the source IO::Buffer object,
since the referred memory region won't get moved by GC.
Closes: [Bug #21210]
Notes:
Merged: https://github.com/ruby/ruby/pull/13033
|
|
Prior to this commit we compiled `putstring` and `putchilledstring` to
`StringCopy`, but then failed to compile past HIR.
This commit adds codegen for `StringCopy` to call `rb_ec_str_ressurrect`
as the VM does for these instructions.
Notes:
Merged: https://github.com/ruby/ruby/pull/13625
|
|
in that case
Notes:
Merged: https://github.com/ruby/ruby/pull/13615
|
|
* ZJIT: Add support for putspecialobject
* Address feedback
* Update tests
* Adjust the indentation of a Ruby test
---------
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13624
|
|
It is checked against the given `list`, do not print the same output
twice.
Notes:
Merged: https://github.com/ruby/ruby/pull/13624
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13624
|