| Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/date/commit/47778c32d8
|
|
https://github.com/ruby/date/commit/5e6a458179
|
|
https://github.com/ruby/date/commit/2682dc79c0
|
|
https://github.com/ruby/date/commit/cd7a329dfd
|
|
Neri-Schneider algorithm
Replace floating-point arithmetic and iterative loops with pure integer
operations for ~40% faster Date operations. Date.ordinal and Date.commercial
are ~2x faster due to O(1) first-day-of-year calculation.
Reference: https://arxiv.org/abs/2102.06959
https://github.com/ruby/date/commit/cc639549d6
|
|
https://github.com/ruby/date/commit/1d0aadc295
|
|
It's possible that both half_days_in_day and day_in_nanoseconds are Ruby
objects, which means that creating day_in_nanoseconds may trigger GC.
Since half_days_in_day is not registered as a mark object until after
day_in_nanoseconds is allocated, the GC may reclaim half_days_in_day.
We can see this crash:
ruby(rb_print_backtrace+0xb) [0x63a373c0] vm_dump.c:1105
ruby(rb_vm_bugreport) vm_dump.c:1450
ruby(rb_assert_failure_detail+0xdb) [0x6371d3a2] error.c:1216
ruby(RB_FL_TEST_RAW+0x0) [0x6371d3d5] error.c:1192
ruby(rb_assert_failure) (null):0
ruby(rb_gc_impl_writebarrier+0xb4) [0x636f01e4] gc/default/default.c:6103
ruby(pin_array_list_append+0x72) [0x638f9787] include/ruby/internal/gc.h:788
ruby(rb_vm_register_global_object) vm.c:4713
ruby(rb_gc_register_mark_object+0x3a) [0x6374144a] gc.c:3449
.ext/i686-linux-gnu/date_core.so(Init_date_core+0x204) [0xdbec86c4] ext/date/date_core.c:9511
.ext/i686-linux-gnu/date_core.so(Init_date_core) (null):0
ruby(dln_load_and_init+0x71) [0x6392c541] dln.c:521
ruby(dln_load_feature+0xd2) [0x6392c7d2] dln.c:566
ruby(load_ext+0xc3) [0x637931b3] load.c:1210
ruby(rb_vm_pop_frame+0x0) [0x638f80cd] vm.c:3120
ruby(rb_vm_call_cfunc_in_box) vm.c:3122
ruby(rb_long2num_inline+0x0) [0x637956f8] load.c:1353
ruby(require_internal) load.c:1354
ruby(rb_require_string_internal+0x60) [0x63795fa1] load.c:1457
ruby(rb_require_string) load.c:1443
https://github.com/ruby/date/commit/cbec5948e0
|
|
Re-organize page docs
|
|
https://github.com/ruby/date/commit/d535f7e85f
|
|
https://github.com/ruby/date/commit/545066ca28
|
|
https://github.com/ruby/date/commit/159e1ebb7f
https://github.com/ruby/date/commit/4f7b6c9b42
|
|
https://github.com/ruby/date/commit/afaa4a997b
|
|
|
|
Issue - https://bugs.ruby-lang.org/issues/21436
Apparently, the lower bound check is missing, which results in overflow & wrapping later on in RB_INT2FIX
Signed-off-by: Dmitry Dygalo <dmitry.dygalo@workato.com>
https://github.com/ruby/date/commit/67d75e8423
|
|
Addresses https://bugs.ruby-lang.org/issues/21437
Signed-off-by: Dmitry Dygalo <dmitry.dygalo@workato.com>
https://github.com/ruby/date/commit/31f07bc576
|
|
https://github.com/ruby/date/commit/dbf4e957dc
|
|
This flag isn't really meant to be public, it's an implementation
detail of Ruby.
And checking it before calling `rb_copy_generic_ivar` only save
a function call.
https://github.com/ruby/date/commit/8175252653
|
|
https://github.com/ruby/date/commit/b28617cde0
|
|
https://github.com/ruby/date/commit/6dd7969a64
|
|
https://github.com/ruby/date/commit/a3d85e0be5
|
|
```
date_strptime.c:253:324: warning: misleading indentation;
statement is not part of the previous 'if' [-Wmisleading-indentation]
253 | ...((VALUE)RUBY_Qtrue)); return 0; } while (0); si += l; } while (0);
| ^
date_strptime.c:252:7: note: previous statement is here
252 | else
| ^
```
https://github.com/ruby/date/commit/41aed5b746
|
|
https://github.com/ruby/date/commit/904d4b9607
Notes:
Merged: https://github.com/ruby/ruby/pull/12469
|
|
https://github.com/ruby/date/commit/cb52e64be1
|
|
https://github.com/ruby/date/commit/a3295ad262
|
|
This still support ruby 2.6 which does not require C99.
https://github.com/ruby/date/commit/61d849758f
|
|
It was used intentionally.
https://github.com/ruby/date/commit/291b40f939
|
|
https://github.com/ruby/date/commit/e677e99a86
|
|
https://github.com/ruby/date/commit/f277463439
|
|
Replace the decrement (argc2--) with an increment (argc2++) for
the correct number of arguments when opt is provided.
https://github.com/ruby/date/commit/b6974b00d8
|
|
https://github.com/ruby/date/commit/94f8e51e65
|
|
While working on a separate issue we found that in some cases
`ary_heap_realloc` was being called on frozen arrays. To fix this, this
change does the following:
1) Updates `rb_ary_freeze` to assert the type is an array, return if
already frozen, and shrink the capacity if it is not embedded, shared
or a shared root.
2) Replaces `rb_obj_freeze` with `rb_ary_freeze` when the object is
always an array.
3) In `ary_heap_realloc`, ensure the new capa is set with
`ARY_SET_CAPA`. Previously the change in capa was not set.
4) Adds an assertion to `ary_heap_realloc` that the array is not frozen.
Some of this work was originally done in
https://github.com/ruby/ruby/pull/2640, referencing this issue
https://bugs.ruby-lang.org/issues/16291. There didn't appear to be any
objections to this PR, it appears to have simply lost traction.
The original PR made changes to arrays and strings at the same time,
this PR only does arrays. Also it was old enough that rather than revive
that branch I've made a new one. I added Lourens as co-author in addtion
to Aaron who helped me with this patch.
The original PR made this change for performance reasons, and while
that's still true for this PR, the goal of this PR is to avoid
calling `ary_heap_realloc` on frozen arrays. The capacity should be
shrunk _before_ the array is frozen, not after.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: methodmissing <lourens@methodmissing.com>
|
|
https://github.com/ruby/date/commit/ef5a0dac5b
|
|
https://github.com/ruby/date/commit/cfbd6a6b13
|
|
https://github.com/ruby/date/commit/5974ac9c7e
|
|
https://github.com/ruby/date/commit/5d67437b1f
|
|
https://github.com/ruby/date/commit/8e5efd4f59
|
|
https://github.com/ruby/date/commit/b3a2c7611e
|
|
`m_sf_in_sec` calls `rb_rational_new` that can cause GC.
https://github.com/ruby/date/commit/6de449ab6a
|
|
|
|
It's been 2 years since ruby/date#49, so it's okay.
https://github.com/ruby/date/commit/435dfec6c8
|
|
By providing a 'changelog_uri' in the metadata of the gemspec
a 'Changelog' link will be shown on https://rubygems.org/gems/date
which makes it quick and easy for someone to check on the changes
introduced with a new version.
Details of this functionality can be found on https://guides.rubygems.org/specification-reference/
https://github.com/ruby/date/commit/2dea4c011d
|
|
https://github.com/ruby/date/commit/50e18d2684
|
|
https://github.com/ruby/date/commit/2adb917487
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7310
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7330
|
|
(https://github.com/ruby/date/pull/88)
https://github.com/ruby/date/commit/cfa7e9868b
|
|
Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the
macros bellow:
* `RBIMPL_ATTR_PACKED_STRUCT_BEGIN`
* `RBIMPL_ATTR_PACKED_STRUCT_END`
* `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN`
* `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END`
Notes:
Merged: https://github.com/ruby/ruby/pull/7268
|
|
https://github.com/ruby/date/commit/ea3644a7c4
|
|
https://github.com/ruby/date/commit/71c35b4054
|
|
https://github.com/ruby/date/commit/3f666fa882
|