| Age | Commit message (Collapse) | Author |
|
This change will be merged into 3.5 along with other encoding, command
line, environment variables, etc.
Revert following commits:
- bd831bcca534955533d9135d8c2f22d7ae5b9aa8
[Bug #20929] Win32: Use `wcsftime`
- 1c15f641cc2bb88fa88123a11036ed58fbf9aa6d
[Bug #20929] Win32: Encode timezone name in UTF-8
- 78762b52185aa80ee55c0d49b495aceed863dce2
[Bug #20929] Fix `assert_zone_encoding`
Notes:
Merged: https://github.com/ruby/ruby/pull/12448
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12269
|
|
The default internal encoding is not taken into account to encode
timezone name.
Notes:
Merged: https://github.com/ruby/ruby/pull/12269
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11892
|
|
In short, get rid of division and modulo of negative integers.
Notes:
Merged: https://github.com/ruby/ruby/pull/11561
|
|
[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
|
|
|
|
This drops the total size of a Time object from 86 bytes to 80 bytes.
Running the benchmark benchmark/time_now.yml, this commit improves
performance of Time.now by about 30%:
```
Time.now
Branch: 13159405.4 i/s
Master: 10036908.7 i/s - 1.31x slower
Time.now(in: "+09:00")
Branch: 2712172.6 i/s
Master: 2138637.9 i/s - 1.27x slower
```
It also decreases memory usage by about 20%:
```
ary = 10_000_000.times.map { Time.now }
puts `ps -o rss= -p #{$$}`
```
Branch: 961792
Master: 1196544
Co-Authored-By: Jean Boussier <byroot@ruby-lang.org>
|
|
assert_separately adds --disable=gems so we don't need to add
--disable-gems when calling assert_separately.
Notes:
Merged: https://github.com/ruby/ruby/pull/8162
|
|
Disallow:
* Only year-month
* Only year-month-day
* Preceding whitespace
* Trailing whitespace
Fixes [Bug #19293]
Notes:
Merged: https://github.com/ruby/ruby/pull/7974
|
|
[Bug #19575]
struct vtm is packed causing it to have a size that is not aligned on
32-bit systems. When allocating it on the stack, it will have unaligned
addresses which means that the fields won't be marked by the GC when
scanning the stack (since the GC only marks aligned addresses). This can
cause crashes when the fields are heap allocated objects like Bignums.
This commit moves the flags in struct time_object into struct vtm for
space efficiency and removes the need for packing.
This is an example of a crash:
ruby(rb_print_backtrace+0xd) [0x56848945] ../src/vm_dump.c:785
ruby(rb_vm_bugreport) ../src/vm_dump.c:1101
ruby(rb_assert_failure+0x7a) [0x56671857] ../src/error.c:878
ruby(vm_search_cc+0x0) [0x56666e47] ../src/vm_method.c:1366
ruby(rb_vm_search_method_slowpath) ../src/vm_insnhelper.c:2090
ruby(callable_method_entry+0x5) [0x568232d3] ../src/vm_method.c:1406
ruby(rb_callable_method_entry) ../src/vm_method.c:1413
ruby(gccct_method_search_slowpath) ../src/vm_eval.c:427
ruby(gccct_method_search+0x20f) [0x568237ef] ../src/vm_eval.c:476
ruby(opt_equality_by_mid_slowpath+0x2c) [0x5682388c] ../src/vm_insnhelper.c:2338
ruby(rb_equal+0x37) [0x566fe577] ../src/object.c:133
ruby(rb_big_eq+0x34) [0x56876ee4] ../src/bignum.c:5554
ruby(rb_int_equal+0x14) [0x566f3ed4] ../src/numeric.c:4640
ruby(rb_int_equal) ../src/numeric.c:4634
ruby(vm_call0_cfunc_with_frame+0x6d) [0x568303c2] ../src/vm_eval.c:148
ruby(vm_call0_cfunc) ../src/vm_eval.c:162
ruby(vm_call0_body) ../src/vm_eval.c:208
ruby(rb_funcallv_scope+0xd1) [0x56833971] ../src/vm_eval.c:85
ruby(RB_TEST+0x0) [0x567e8488] ../src/time.c:78
ruby(eq) ../src/time.c:78
ruby(small_vtm_sub) ../src/time.c:1523
ruby(timelocalw+0x23b) [0x567f3e9b] ../src/time.c:1593
ruby(time_s_alloc+0x0) [0x567f536b] ../src/time.c:3698
ruby(time_new_timew) ../src/time.c:2694
ruby(time_s_mktime) ../src/time.c:3698
Notes:
Merged: https://github.com/ruby/ruby/pull/7650
|
|
[Bug #19390]
We shouldn't check the string length when skipping zeros, as the
string might only contains zero characters, resulting in an empty string.
Notes:
Merged: https://github.com/ruby/ruby/pull/7196
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7051
|
|
* 4-digits or more is required as year
* Minutes and seconds parts are not ommittable
Notes:
Merged: https://github.com/ruby/ruby/pull/4825
|
|
Which limits the precision of subsecond. Defaulted to 9, that
means nanosecond.
Notes:
Merged: https://github.com/ruby/ruby/pull/4825
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4825
|
|
`Time.new` now parses strings such as the result of `Time#inspect`
and restricted ISO-8601 formats.
Notes:
Merged: https://github.com/ruby/ruby/pull/4825
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6594
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6146
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Add a new macro BASE_SLOT_SIZE that determines the slot size.
For Variable Width Allocation (compiled with USE_RVARGC=1), all slot
sizes are powers-of-2 multiples of BASE_SLOT_SIZE.
For USE_RVARGC=0, BASE_SLOT_SIZE is set to sizeof(RVALUE).
Notes:
Merged: https://github.com/ruby/ruby/pull/5517
|
|
|
|
https://bugs.ruby-lang.org/issues/17485#change-89871
Notes:
Merged: https://github.com/ruby/ruby/pull/5344
|
|
https://hackerone.com/reports/1244185
Notes:
Merged: https://github.com/ruby/ruby/pull/5238
|
|
|
|
`vm_ci_argc` gives the number of arguments, but `*[1, 2, 3]` only
counts for one.
Notes:
Merged: https://github.com/ruby/ruby/pull/5124
|
|
Remove tests that assume objects get force recycled.
Notes:
Merged: https://github.com/ruby/ruby/pull/5096
|
|
`struct vtm::year` is a Ruby integer instance, but not a C integer
type.
Notes:
Merged: https://github.com/ruby/ruby/pull/5041
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4813
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4813
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4075
|
|
In RFC 3339, -00:00 is used for the time in UTC is known, but the
offset to local time is unknown. Support that representation by
`-` flag for `z`.
Notes:
Merged: https://github.com/ruby/ruby/pull/4075
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4020
|
|
https://bugs.ruby-lang.org/issues/17485#change-89871
|
|
|
|
|
|
follow up to 9908177857a28633d6279c43a1ad4dfedcb98596
|
|
Instead of suppressing all warnings wholly in each test scripts by
setting `$VERBOSE` to `nil` in `setup` methods.
Notes:
Merged: https://github.com/ruby/ruby/pull/3925
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3841
|
|
Fixes [Bug #17025]
Notes:
Merged: https://github.com/ruby/ruby/pull/3362
|
|
|
|
GC_DEBUG=1 makes this test fail because it changes the size of struct
RVALUE. I don't think the test is useful then. Let's just skip.
|
|
ruby/test_time_tz.rb (not sure only this file affects) changes TZ
and it seems to change internal state. This internal state change
fails test_2038 and test_timegm on 2nd time execution.
At this time I have no idea how to fix this issue, so I skips these
tests on 2nd trial.
You can try this failure with the following command without this patch.
$ make test-all TESTS='--repeat-count=2 ruby/require ruby/time ruby/time_tz'
|
|
If this value is less than zero, then the mask check is guaranteed to
fail as well, so we might as well rely on that.
Notes:
Merged: https://github.com/ruby/ruby/pull/2808
|
|
Suggestion from Laurence Parry.
Fixes [Bug #16030]
Notes:
Merged: https://github.com/ruby/ruby/pull/2572
|
|
|
|
|
|
[Feature #15160]
|