409 Commits
Author SHA1 Message Date
Takashi Kokubun 02744e58f3 merge revision(s) c1877d431e: [Backport #21437]
[ruby/date] [Bug #21437] Date#hash for large years

	Addresses https://bugs.ruby-lang.org/issues/21437

	Signed-off-by: Dmitry Dygalo <dmitry.dygalo@workato.com>

	https://github.com/ruby/date/commit/31f07bc576
2025-07-14 14:31:20 -07:00
Stan Lo 6d00dee30a [ruby/date] Fix broken rdoc-ref to the calendar page
https://github.com/ruby/date/commit/cb52e64be1
2024-12-15 06:20:10 +00:00
Hiroshi SHIBATA 229592f175 [ruby/date] Bump up 3.4.1
https://github.com/ruby/date/commit/a3295ad262
2024-12-02 07:51:06 +00:00
Nobuyoshi Nakada 43dd9c721f [ruby/date] Fix mixed declarations and code
This still support ruby 2.6 which does not require C99.

https://github.com/ruby/date/commit/61d849758f
2024-11-29 02:48:10 +00:00
Nobuyoshi Nakada b910de641b [ruby/date] Suppress compound-token-split-by-macro warnings
It was used intentionally.

https://github.com/ruby/date/commit/291b40f939
2024-11-29 02:48:09 +00:00
Nobuyoshi Nakada 511954dd5c [ruby/date] Extract Julian calendar epoch literals
https://github.com/ruby/date/commit/e677e99a86
2024-11-05 04:19:40 +00:00
Nobuyoshi Nakada c51feedbfd [ruby/date] Update argc by rb_scan_args not to contain keywords
https://github.com/ruby/date/commit/f277463439
2024-11-05 04:19:39 +00:00
Dmitrii Zudin ee4599dbe7 [ruby/date] Fix incorrect argc2 decrement in datetime_s_iso8601 function
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
2024-11-05 03:38:13 +00:00
Hiroshi SHIBATA bb5f28c8f7 [ruby/date] Bump up v3.4.0
https://github.com/ruby/date/commit/94f8e51e65
2024-11-01 13:42:16 +09:00
d25b74b32c Resize arrays in rb_ary_freeze and use it for freezing arrays
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>
2024-07-02 10:34:23 -07:00
Nobuyoshi Nakada 04c86a63cd [ruby/date] Update zonetab.h at 2024-06-26
https://github.com/ruby/date/commit/ef5a0dac5b
2024-06-26 10:01:21 +00:00
Nobuyoshi Nakada 865a2027a1 [ruby/date] Use locale insensitive casecmp
https://github.com/ruby/date/commit/cfbd6a6b13
2024-06-24 15:36:56 +00:00
Nobuyoshi Nakada 7aafd3ed0e [ruby/date] Use strncasecmp
https://github.com/ruby/date/commit/5974ac9c7e
2024-06-24 15:36:56 +00:00
Nobuyoshi Nakada 12e66f11e5 [ruby/date] Use gperf 3.1 to generate ANSI-C code
https://github.com/ruby/date/commit/5d67437b1f
2024-06-24 15:36:55 +00:00
Nobuyoshi Nakada c2fd3dfb98 [ruby/date] Update zonetab.h at 2024-06-19
https://github.com/ruby/date/commit/8e5efd4f59
2024-06-20 15:16:48 +09:00
p0pemaru cb6dcc7746 [ruby/date] [DOC] specify the unit of return value for Date#-
https://github.com/ruby/date/commit/b3a2c7611e
2024-06-03 05:24:18 +00:00
Nobuyoshi Nakada 77e5e06846 [ruby/date] Prevent converted gregorian date from GC
`m_sf_in_sec` calls `rb_rational_new` that can cause GC.

https://github.com/ruby/date/commit/6de449ab6a
2024-06-03 05:23:44 +00:00
卜部昌平 c844968b72 ruby tool/update-deps --fix 2024-04-27 21:55:28 +09:00
Nobuyoshi Nakada 2e6f8554f8 [ruby/date] Remove the unintentional ability to parse Symbol
It's been 2 years since ruby/date#49, so it's okay.

https://github.com/ruby/date/commit/435dfec6c8
2024-02-21 16:04:52 +00:00
Mark Young cb6a556927 [ruby/date] Provide a 'Changelog' link on rubygems.org/gems/date
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
2023-12-25 21:12:49 +09:00
Hiroshi SHIBATA da2cf947bc [ruby/date] Bump up 3.3.4
https://github.com/ruby/date/commit/50e18d2684
2023-11-07 04:16:02 +00:00
BurdetteLamar 7ffee5681f [ruby/date] [DOC] Fix link
https://github.com/ruby/date/commit/2adb917487
2023-09-20 19:48:28 +00:00
Matt Valentine-House 5e4b80177e Update the depend files 2023-02-28 09:09:00 -08:00
Matt Valentine-House f38c6552f9 Remove intern/gc.h from Make deps 2023-02-27 10:11:56 -08:00
Burdette Lamar 3d53827130 [ruby/date] Removed (newly unneeded) alias remarks
(https://github.com/ruby/date/pull/88)

https://github.com/ruby/date/commit/cfa7e9868b
2023-02-19 22:24:39 +00:00
Nobuyoshi Nakada 899ea35035 Extract include/ruby/internal/attr/packed_struct.h
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`
2023-02-08 12:34:13 +09:00
Hiroshi SHIBATA 1998d97908 [ruby/date] Bump version to 3.3.3
https://github.com/ruby/date/commit/ea3644a7c4
2022-12-19 10:50:21 +09:00
Nobuyoshi Nakada c316a5f2f1 [ruby/date] Adjust format [ci skip]
https://github.com/ruby/date/commit/71c35b4054
2022-12-18 03:03:54 +00:00
Nobuyoshi Nakada b8cc0992c6 [ruby/date] Extract head_match_p and abbreviated name length constants
https://github.com/ruby/date/commit/3f666fa882
2022-12-18 02:58:51 +00:00
Nobuyoshi Nakada df49bf8150 [ruby/date] Consider the length of string to parse
https://github.com/ruby/date/commit/3bfed83ce7
2022-12-18 02:58:50 +00:00
Nobuyoshi Nakada 49dc424ff3 [ruby/date] Remove extz_pats table
https://github.com/ruby/date/commit/945e26e243
2022-12-18 02:58:49 +00:00
Nobuyoshi Nakada 70c905963e [ruby/date] Remove merid_names table
https://github.com/ruby/date/commit/7fe2bd5f94
2022-12-18 02:58:48 +00:00
Nobuyoshi Nakada 6efeaabef0 [ruby/date] Match abbreviated day and month names with head of full names
https://github.com/ruby/date/commit/a45f8f03c9
2022-12-18 02:58:47 +00:00
Hiroshi SHIBATA 11f3bef260 [ruby/date] Bump version to 3.3.2
https://github.com/ruby/date/commit/7afd9d4615
2022-12-16 06:36:03 +00:00
Hiroshi SHIBATA bec7deba30 [ruby/date] Fixed wrong minimum version of Ruby
Fixed https://github.com/ruby/date/issues/83

https://github.com/ruby/date/commit/9731a3e732
2022-12-14 07:56:09 +00:00
zverok 1859784422 [ruby/date] Implement Date#deconstruct_keys and DateTime#deconstruct_keys
https://github.com/ruby/date/commit/6bb6d3a810
2022-12-13 19:52:06 +00:00
Hiroshi SHIBATA 01cf3ab3b8 [ruby/date] Bump version to 3.3.1
https://github.com/ruby/date/commit/b7a8229041
2022-12-09 07:57:33 +00:00
Charles Oliver Nutter e96b64f5e7 [ruby/date] No-op gem for JRuby for now
Remove all shipped files and require path on JRuby until we can
add JRuby's extension to the gem.

Temporary workaround for #48

https://github.com/ruby/date/commit/94c3becef2
2022-12-09 07:55:07 +00:00
Hiroshi SHIBATA 774dad4915 [ruby/date] Bump version to 3.3.0
https://github.com/ruby/date/commit/ac1642cf39
2022-12-05 05:19:16 +00:00
Nobuyoshi Nakada 739ad81ff1 [ruby/date] Check month range as civil 2022-10-27 05:36:11 +00:00
Nobuyoshi Nakada 3539da64fc [DOC] Replace the external URIs to docs with rdoc-ref 2022-10-12 12:27:40 +09:00
Nobuyoshi Nakada 1b7c5c394f [ruby/date] Fix misplaced time zone offset checks
https://github.com/ruby/date/commit/d21c69450a
2022-10-07 14:41:31 +09:00
Nobuyoshi Nakada cb16dcb184 [ruby/date] The shrunk words to be copied is limited
Th buffer size is small enough and no need to allocate dynamically.

https://github.com/ruby/date/commit/f62bf0a01d
2022-09-29 14:56:39 +09:00
Nobuyoshi Nakada 5a8aaedaff [ruby/date] Narrow ALLOCV region for shrunk words
https://github.com/ruby/date/commit/f51b038074
2022-09-29 14:06:36 +09:00
Nobuyoshi Nakada d12fce7af3 [ruby/date] Check time zone offset elements
Too big parts of fractional hour time zone offset can cause assertion
failures.

https://github.com/ruby/date/commit/06bcfb2729
2022-09-28 21:07:00 +09:00
卜部昌平 45741918e1 reserved_word: just use gperf 3.1 declaration
The reason why this was commented out was because of gperf 3.0 vs 3.1
differences (see [Feature #13883]).  Five years passed, I am pretty
confident that we can drop support of old versions here.

Ditto for uniname2ctype_p(), onig_jis_property(), and zonetab().
2022-09-21 11:44:09 +09:00
Burdette Lamar 8d40ede2e0 [ruby/date] [DOC] Enhanced intro for Date (https://github.com/ruby/date/pull/72)
https://github.com/ruby/date/commit/59a6673221
2022-08-15 22:16:23 +09:00
Nobuyoshi Nakada 5c9ce54757 [ruby/date] bump up to 3.2.3
https://github.com/ruby/date/commit/dff37b3dd1
2022-08-08 23:59:12 +09:00
Nobuyoshi Nakada e07d450dea [ruby/date] Fix Time#to_datetime before calendar reform
Time is always in the proleptic Gregorian calendar.
Also DateTime#to_time should convert to the Gregorian calendar first,
before extracting its components.

https://bugs.ruby-lang.org/issues/18946#change-98527

https://github.com/ruby/date/commit/b2aee75248
2022-08-08 23:50:17 +09:00
Burdette Lamar 1607c6d281 [DOC] New doc about Julian/Gregorian (#70) 2022-08-07 20:42:31 -04:00