| Age | Commit message (Collapse) | Author |
|
Basically a redo of https://github.com/ruby/ruby/commit/a1403fb7cbd1fe0df97c932be9814c86081783dc
but respecting the frozen string literal magic comment
Fixes [Bug #21187]
|
|
[PATCH] [Bug #21666] Get rid of use of unspecified values
|
|
Fixes k-takata/Onigmo#92.
This fix was ported from oniguruma:
https://github.com/kkos/oniguruma/commit/257082dac8c6019198b56324012f0bd1830ff4ba
https://github.com/k-takata/Onigmo/commit/b1a5445fbeba97b3e94a733c2ce11c033453af73
|
|
|
|
See <https://bugs.ruby-lang.org/issues/19417#note-3>.
https://unicode.org/reports/tr18/#word states word should match join_control chars.
It did not previously:
```ruby
[*0x0..0xD799, *0xE000..0x10FFFF].map { |n| n.chr 'utf-8' } => all_chars
all_chars.grep(/\p{join_control}/) => jc
jc.count # => 2
jc.grep(/\p{word}/).count # => 0
```
[Backport #19417]
---
Backporting note: I regenerated `enc/unicode/15.0.0/name2ctype.h` using
`make update-unicode`.
|
|
Previously, ruby2_keywords could be used on a method or proc with
post arguments, but I don't think the behavior is desired:
```ruby
def a(*c, **kw) [c, kw] end
def b(*a, b) a(*a, b) end
ruby2_keywords(:b)
b({foo: 1}, bar: 1)
```
This changes ruby2_keywords to emit a warning and not set the
flag on a method/proc with post arguments.
While here, fix the ruby2_keywords specs for warnings, since they
weren't testing what they should be testing. They all warned
because the method didn't accept a rest argument, not because it
accepted a keyword or keyword rest argument.
[Backport #21402]
|
|
[Bug #20009] Support marshaling non-ASCII name class/module
|
|
[Backport #21094]
|
|
The message from dlerror is not our concern.
|
|
|
|
|
|
d3abee739f4feb91bb9aaae33877d70c8c576db0: [Backport #21095]
Prefer `uname -n` over `hostname`. (#12647)
Add fallback for `hostname` if `uname` isn't available. (#12655)
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12455
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12438
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12438
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12297
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12297
|
|
On my environment with `sudo ufw default reject outgoing`,
outgoing packets are filtered without allow rules.
Notes:
Merged: https://github.com/ruby/ruby/pull/12238
|
|
[Feature #20912]
Notes:
Merged: https://github.com/ruby/ruby/pull/12177
|
|
https://github.com/ruby/ruby/actions/runs/11948300522/job/33305664284?pr=12139
```
IO#wait [events, timeout] passed changes thread status to 'sleep' when waits for WRITABLE event FAILED
Expected false == "sleep"
to be truthy but was false
D:/a/ruby/ruby/src/spec/ruby/library/io-wait/wait_spec.rb:99:in 'block (3 levels) in <top (required)>'
D:/a/ruby/ruby/src/spec/ruby/library/io-wait/wait_spec.rb:8:in '<top (required)>'
```
Notes:
Merged: https://github.com/ruby/ruby/pull/12140
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12114
|
|
This will add +MOD_GC to the version string and Ruby description when
Ruby is compiled with shared gc support.
When shared GC support is compiled in and a GC module has been loaded
using RUBY_GC_LIBRARY, the version string will include the name of
the currently active GC as reported by the rb_gc_active_gc_name function
in the form
+MOD_GC[gc_name]
[Feature #20794]
Notes:
Merged: https://github.com/ruby/ruby/pull/11872
|
|
* Use FL_USER0 for ELTS_SHARED
This makes space in RString for two bits for chilled strings.
* Mark strings returned by `Symbol#to_s` as chilled
[Feature #20350]
`STR_CHILLED` now spans on two user flags. If one bit is set it
marks a chilled string literal, if it's the other it marks a
`Symbol#to_s` chilled string.
Since it's not possible, and doesn't make much sense to include
debug info when `--debug-frozen-string-literal` is set, we can't
include allocation source, but we can safely include the symbol
name in the warning message, making it much easier to find the source
of the issue.
Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
---------
Co-authored-by: Étienne Barrié <etienne.barrie@gmail.com>
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
|
|
... instead, just calculate the value unless it is too big.
Also, this change raises an ArgumentError if it is expected to exceed
16 GB in a 64-bit environment.
(It is possible to calculate it straightforward, but it would likely be
out-of-memory, so I didn't think it would make sense.)
[Feature #20811]
Notes:
Merged: https://github.com/ruby/ruby/pull/12033
|
|
* See discussion on https://github.com/ruby/spec/pull/1210
|
|
The test was too flaky
|
|
|
|
|
|
|
|
* 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 <maximecb@ruby-lang.org>
|
|
[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 <byroot@ruby-lang.org>
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/11893
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11892
|
|
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
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 <samuel@codeotaku.com>
|
|
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
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 <zverok.offline@gmail.com>
|