Age | Commit message (Collapse) | Author |
|
* YJIT: Replace Array#each only when YJIT is enabled
* Add comments about BUILTIN_ATTR_C_TRACE
* Make Ruby Array#each available with --yjit as well
* Fix all paths that expect a C location
* Use method_basic_definition_p to detect patches
* Copy a comment about C_TRACE flag to compilers
* Rephrase a comment about add_yjit_hook
* Give METHOD_ENTRY_BASIC flag to Array#each
* Add --yjit-c-builtin option
* Allow inconsistent source_location in test-spec
* Refactor a check of BUILTIN_ATTR_C_TRACE
* Set METHOD_ENTRY_BASIC without touching vm->running
Notes:
Merged-By: maximecb <[email protected]>
|
|
[Bug #20803]
`abc` is used a lot across the ruby spec suite, if another test runs before
this spec is loaded and create this symbol dynamically (`"abc".to_sym`)
the spec will fail.
So it's preferable to use a symbol name that is very unlikely to be
used elsewhere to avoid flakes.
Notes:
Merged: https://github.com/ruby/ruby/pull/11942
|
|
[Feature #20205]
The warning now suggests running with --debug-frozen-string-literal:
```
test.rb:3: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information)
```
When using --debug-frozen-string-literal, the location where the string
was created is shown:
```
test.rb:3: warning: literal string will be frozen in the future
test.rb:1: info: the string was created here
```
When resurrecting strings and debug mode is not enabled, the overhead is a simple FL_TEST_RAW.
When mutating chilled strings and deprecation warnings are not enabled,
the overhead is a simple warning category enabled check.
Co-authored-by: Jean Boussier <[email protected]>
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Co-authored-by: Jean Boussier <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/11893
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11892
|
|
Notes:
Merged-By: ioquatix <[email protected]>
|
|
The absence of either the integer or fractional part should be
allowed.
Notes:
Merged: https://github.com/ruby/ruby/pull/11807
|
|
Notes:
Merged-By: ioquatix <[email protected]>
|
|
Notes:
Merged-By: ioquatix <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/10924
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7968
|
|
This is a static function only called in two places (rb_to_id and
rb_to_symbol), and in both places, both symbols and strings are
allowed. This makes the error message consistent with rb_check_id
and rb_check_symbol.
Fixes [Bug #20607]
Notes:
Merged: https://github.com/ruby/ruby/pull/11097
|
|
https://github.com/ruby/ruby/commit/d81b0588bb3c97167d1f7e2d2a74185e0c19b68c
|
|
[Feature #20594]
A handy method to construct a string out of multiple chunks.
Contrary to `String#concat`, it doesn't do any encoding negociation,
and simply append the content as bytes regardless of whether this
result in a broken string or not.
It's the caller responsibility to check for `String#valid_encoding?`
in cases where it's needed.
When passed integers, only the lower byte is considered, like in
`String#setbyte`.
Notes:
Merged: https://github.com/ruby/ruby/pull/11552
|
|
[Feature #20702]
Works the same way than `Hash#fetch_values` for for array.
Notes:
Merged: https://github.com/ruby/ruby/pull/11557
|
|
[Feature #20707]
Converting Time into RFC3339 / ISO8601 representation is an significant
hotspot for applications that serialize data in JSON, XML or other formats.
By moving it into core we can optimize it much further than what `strftime` will
allow.
```
compare-ruby: ruby 3.4.0dev (2024-08-29T13:11:40Z master 6b08a50a62) +YJIT [arm64-darwin23]
built-ruby: ruby 3.4.0dev (2024-08-30T13:17:32Z native-xmlschema 34041ff71f) +YJIT [arm64-darwin23]
warming up......
| |compare-ruby|built-ruby|
|:-----------------------|-----------:|---------:|
|time.xmlschema | 1.087M| 5.190M|
| | -| 4.78x|
|utc_time.xmlschema | 1.464M| 6.848M|
| | -| 4.68x|
|time.xmlschema(6) | 859.960k| 4.646M|
| | -| 5.40x|
|utc_time.xmlschema(6) | 1.080M| 5.917M|
| | -| 5.48x|
|time.xmlschema(9) | 893.909k| 4.668M|
| | -| 5.22x|
|utc_time.xmlschema(9) | 1.056M| 5.707M|
| | -| 5.40x|
```
Notes:
Merged: https://github.com/ruby/ruby/pull/11510
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11454
|
|
Make Range#step to consistently use + for iteration [Feature #18368]
Previously, non-numerics expected step to be integer,
and iterated with begin#succ, skipping over step value
steps. Since this commit, numeric and non-numeric iteration
behaves the same way, by using + operator.
Notes:
Merged-By: zverok <[email protected]>
|
|
The spec is actually testing a behaviour stemming from NUM2INT(), and
since `sizeof(long)>=sizeof(int)`, `min_long-1` always makes NUM2INT()
raise `RangeError`.
Notes:
Merged: https://github.com/ruby/ruby/pull/11130
|
|
There is no guarantee that Integer#size will continue to return
`sizeof(long)` for small integers.
Use the `l!` specifier for Array#pack instead. It is a public
interface that has a direct relationship with the `long` type.
Notes:
Merged: https://github.com/ruby/ruby/pull/11130
|
|
What a "word" is when talking about sizes is confusing because it's a
highly overloaded term. Intel, Microsoft, and GDB are just a few vendors
that have their own definition of what a "word" is. Specs that used the
"wordsize" guard actually were mostly testing for the size of the C
`long` fundamental type, so rename the guard for clarity.
Also, get the size of `long` directly from RbConfig instead of guessing
using Integer#size. Integer#size is not guaranteed to have anything to
do with the `long` type.
Notes:
Merged: https://github.com/ruby/ruby/pull/11130
|
|
Prepare for https://github.com/ruby/uri/pull/107
|
|
* "Allow ambiguosity of `return` line"
65b991bc8571b7b718fc22bd33a43c4d269bf52d
* "Move to test/.excludes-prism"
3b4ff810d2fefdf0194bd774bc04f6f17e2ccae7
* "Pending `EVENT_RETURN` settracefunc tests with Prism"
a7f33c99c69e3cc62b7a24ce35f51f76cc5bfaa2
Notes:
Merged: https://github.com/ruby/ruby/pull/11163
|
|
16 beta
|
|
[Bug #20593]
It's fairly common to use `format` to interpolate a number of values
into a user provided strings.
The arguments not matching are a problem when they are positional,
but when they are named, it's absolutely fine and we shouldn't
emit a warning.
|
|
[Feature #19236]
When building a large hash, pre-allocating it with enough
capacity can save many re-hashes and significantly improve
performance.
```
/opt/rubies/3.3.0/bin/ruby --disable=gems -rrubygems -I./benchmark/lib ./benchmark/benchmark-driver/exe/benchmark-driver \
--executables="compare-ruby::../miniruby-master -I.ext/common --disable-gem" \
--executables="built-ruby::./miniruby --disable-gem" \
--output=markdown --output-compare -v $(find ./benchmark -maxdepth 1 -name 'hash_new' -o -name '*hash_new*.yml' -o -name '*hash_new*.rb' | sort)
compare-ruby: ruby 3.4.0dev (2024-03-25T11:48:11Z master f53209f023) +YJIT dev [arm64-darwin23]
last_commit=[ruby/irb] Cache RDoc::RI::Driver.new (https://github.com/ruby/irb/pull/911)
built-ruby: ruby 3.4.0dev (2024-03-25T15:29:40Z hash-new-rb 77652b08a2) +YJIT dev [arm64-darwin23]
warming up...
| |compare-ruby|built-ruby|
|:-------------------|-----------:|---------:|
|new | 7.614M| 5.976M|
| | 1.27x| -|
|new_with_capa_1k | 13.931k| 15.698k|
| | -| 1.13x|
|new_with_capa_100k | 124.746| 148.283|
| | -| 1.19x|
```
|
|
Previously, a TypeError was not raised if there were no thread
variables, because the conversion to symbol was done after that
check. Convert to symbol before checking for whether thread
variables are set to make the behavior consistent.
Fixes [Bug #20606]
|
|
|
|
|
|
This was an optimization for versions prior to 1.9 that traverse the
AST at runtime.
|
|
If $HOME isn't a valid directory, these specs fail, but I think it
is better to skip in this case, as it does not indicate a bug.
This fixes specs when run in the OpenBSD port, which sets $HOME
to an invalid directory to ensure that software's build system
is not accidentally relying on it.
|
|
* https://github.com/ruby/net-ftp/pull/34
* https://github.com/ruby/net-ftp/issues/36
|
|
[Bug #20573]
Followup: https://github.com/ruby/ruby/pull/10960
I believe `Kernel#warn` should behave in the same way than internal
`rb_warning_* APIs
|
|
`SPEC_TEMP_DIR` is not present until `tmp()` method is called
on parallel run. In this case `tmp()` is called with `File.umask = 0`.
This patch makes `SPEC_TEMP_DIR` before `File.umask = 0`.
To solve the issue essentially, I think `SPEC_TEMP_DIR` should be
prepared at the beginning of parallel process.
|
|
|
|
|
|
```
1)
TracePoint#inspect returns a String showing the event, method, path and line for a :call event FAILED
Expected "#<TracePoint:call 'call' /tmp/ruby/src/trunk/spec/ruby/core/objectspace/define_finalizer_spec.rb:33>" =~ /\A#<TracePoint:call [`']trace_point_spec_test_call' \/tmp\/ruby\/src\/trunk\/spec\/ruby\/core\/tracepoint\/inspect_spec.rb:43>\z/
to be truthy but was nil
```
This kind of failures comes because of finaizers.
So check the current file or not.
|
|
|
|
|
|
|
|
https://bugs.ruby-lang.org/issues/20478
|
|
|
|
They were initially made frozen to avoid false positives for cases such
as:
str = str.dup if str.frozen?
But this may cause bugs and is generally confusing for users.
[Feature #20205]
Co-authored-by: Jean Boussier <[email protected]>
|
|
|
|
|
|
[Bug #20421]
The bug was fixed in Ruby 3.3 via 9dcdffb8bf8a3654fd78bf1a58b30c8e13888a7a
|
|
For that particular spec, the empty lines' presence is not relevant.
So let's remove them to make the spec easier to maintain.
|
|
|