Граф коммитов

269 Коммитов

Автор SHA1 Сообщение Дата
nobu 320c98b436 date: support for Reiwa, new Japanese era
[Feature #15742]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-09 01:27:36 +00:00
nobu 63e66f08b6 date_core.c: [DOC] Heisei will be assumed if no-era [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-09 01:27:35 +00:00
svn a6146af5bd * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 10:56:37 +00:00
nobu 1329c7cdca date: make zone a substring to copy encoding and taintedness
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 10:56:36 +00:00
nobu 7cd6706b9a date_parse.c: name JISX0301_DEFAULT_ERA
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02 04:36:34 +00:00
nobu da0fceae3b date_parse.c: renamed JAPANESE prefix as JISX0301
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02 04:36:33 +00:00
svn 5f3e5e6fc5 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02 03:49:00 +00:00
nobu e8f8cf111f date: use del_hash to extract an element destructively
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02 03:48:58 +00:00
nobu 285817c6d8 date_parse.c: removed 'r' which is not in JIS X 0301 yet
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-01 05:28:25 +00:00
svn e836cd0b9f * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-01 05:21:39 +00:00
nobu 744c314059 date_parse.c: extract Japanese era initials
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-01 05:21:36 +00:00
nobu 3d1c86a26f Removed moving toplevel header since r12501
Moving public headers was 12-years ago, no depend files would
expect ruby.h in the top source directory now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08 02:46:22 +00:00
hsbt da1f9199bd Bump version to date-2.0.0.
I forgot to change it when Ruby 2.6.0 was released.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-07 06:01:49 +00:00
nobu 21d99677f6 Separate RSTRING_PTR from a function call
Do not apply RSTRING_PTR, a macro which evaluats its argument
multiple times, on a function call.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-13 05:09:58 +00:00
nobu c1534d206d Revise Date#hour, #min, #sec
For ActiveSupport.  [ruby-core:90443] [Bug #15403]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12 11:43:14 +00:00
nobu 1a0e374b33 ext/date: Fix !NDEBUG code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 05:09:34 +00:00
nobu b572705486 date_core.c: moved some methods to DateTime
* ext/date/date_core.c (Init_date_core): moved methods which make
  sense only for DateTime to that class, instead of defining
  private methods in Date and making them public in DateTime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 04:35:13 +00:00
nobu 73400c01f7 date_core.c: reorder ComplexDateData
* ext/date/date_core.c (ComplexDateData): reordered to adjust
  common part with SimpleDateData.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 04:30:31 +00:00
nobu 3d5be5f86a date_core.c: use static ID variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13 04:51:46 +00:00
nobu 93f91eb68f date_core.c: obey to the allocation framework
* ext/date/date_core.c (date_initialize): separate from
  date_s_civil and obey the allocation framework.

* ext/date/date_core.c (datetime_initialize): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13 04:29:32 +00:00
nobu 0fa71d44d5 date_core.c: respect COMPLEX_DAT bit
* ext/date/date_core.c (d_lite_marshal_load): respect COMPLEX_DAT
  bit in the pre-allocated structure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13 04:29:31 +00:00
nobu 8655d0735f date_core.c: keep COMPLEX_DAT bit
* ext/date/date_core.c (d_lite_initialize_copy): do not change
  COMPLEX_DAT bit, as the structure does not change.  initialize
  member-wise instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13 04:29:30 +00:00
nobu 53ad55e4ca date_core.c: set/reset COMPLEX_DAT
* ext/date/date_core.c (set_to_simple, set_to_complex): always
  set/reset COMPLEX_DAT bit, which is very tightly bound to the
  structure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13 04:29:29 +00:00
nobu 480a21f435 RSTRING_PTR may not be terminated in the future
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 06:19:05 +00:00
nobu 8c90838f7c 10**3 is always 1000
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 06:14:07 +00:00
nobu dcd4914b3a adjust indent
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 06:14:06 +00:00
nobu c4816a11e4 surround macro block with do/while
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01 04:09:02 +00:00
kazu c3e16351d4 [DOC] leap seconds [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31 15:05:29 +00:00
hsbt 7d9109f800 Removed needless date attribute from gemspec of default gems.
They are assigned automatically when pushing gem file to rubygems.org.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-07 12:02:10 +00:00
nobu 576b245ffa Removed useless assertions [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09 03:51:04 +00:00
nobu 7ab3f98604 date_core.c: check conversion
* ext/date/date_core.c (offset_to_sec, d_lite_plus): check
  conversion results, to get rid of infinite recursion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-07 08:07:24 +00:00
nobu d1ea2f9d8f date_parse.c, date_strptime.c: ensure symbols static all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 13:17:35 +00:00
nobu a32e4169e1 date_core.c: ensure symbols static all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 04:49:51 +00:00
nobu d3d845396e date_core.c: defensive code
* ext/date/date_core.c (f_cmp): check comparison failure.

* ext/date/date_core.c (d_lite_step): deal with the comparison
  result more defensively.  [ruby-core:85796] [Bug #14549]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 04:28:11 +00:00
hsbt 6b669d880c Bump version to date-1.0.0 as default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11 03:56:01 +00:00
nobu a4804fbdf5 support gperf 3.1
* tool/gperf.sed: extracted sed commands to a script.  ANSI-C code
  produced by gperf 3.1 declares length arguments as `size_t`.  it
  causes conflict with existing declarations, and needs casts for
  a local variable and return statements.
  [Feature #13883]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08 05:51:19 +00:00
rhe e2cb0eded4 ext/date/extconf.rb: check for timezone and altzone
Instead of in configure.in. As of r28592 the HAVE_VAR_TIMEZONE and
HAVE_VAR_ALTZONE macros are only used by ext/date. ext/date doesn't care
whether they are int or long, so just check for the existence.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-17 04:26:51 +00:00
nobu 65b87de350 ruby.h: unnormalized Fixnum value
* include/ruby/ruby.h (ST2FIX): fix unnormalized Fixnum value bug
  on mingw/mswin.  [ruby-core:82687] [Bug #13877]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-07 03:24:08 +00:00
hsbt 7eb444d9a3 Update gemspec for standalone gem that is ruby/date repository.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14 07:47:21 +00:00
hsbt 0a907a3792 Make string literal to frozen object on gemspec of defulte gems.
Added following gemspecs.

    * extensions: date, dbm, etc, fiddle, gdbm, sdbm, stringio, strscan, zlib
    * pure ruby libraries: cmath, csv, fileutils, scanf, webrick

  psych and rdoc is out of scope of this commit. I will merge after
  upstream was change to `frozen_string_literal: true`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-19 13:03:06 +00:00
stomar 257eacee2c date_core.c: fix docs for %Z format
* ext/date/date_core.c: [DOC] fix documentation for %Z format
  of {Date,DateTime}.strftime.

  Reported by Damon Timm.  Based on a patch by nano.
  [ruby-core:79602] [Bug #13231] [Fix GH-1565]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-09 18:56:22 +00:00
shyouhei 20c72dc89d ruby tool/update-deps --fix
Onigumo 6 (r57045) introduced new onigumo.h header file, which is
required from quite much everywhere.  This commit adds necessary
dependencies.

Note: ruby/oniguruma.h now includes onigumo.h,
      ruby/io.h includes oniguruma.h,
      ruby/encoding.h also includes oniguruma.h,
      and internal.h includes encoding.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22 06:00:18 +00:00
stomar d8bf178531 date_core.c: fix error in DateTime docs
* ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339.
  Reported by Andreas Rayo Kniep.  [ruby-core:68418] [Bug #10936]

* ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and
  DateTime#xmlschema; other small improvements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-19 09:51:29 +00:00
stomar 9fe1433575 date_core.c: expand docs for Date shifting
* ext/date/date_core.c: [DOC] expand docs for Date shifting

  * add examples for Date#>> and Date#<< that clarify some edge cases
  * add examples for Date#next_year and Date#prev_year
  * add cross references to Date#>> and Date#<<

  [ruby-core:79584] [Bug #13225]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 18:26:22 +00:00
hsbt 2507e9000e Fix a required ruby version on gemspec of gemified libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 07:14:22 +00:00
nobu bcad5a51d7 date_core.c: [DOC] revise docs [ci skip]
* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting

[ruby-core:79433] [Bug #13193]
Author:    Marcus Stollsteimer <sto.mar@web.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-06 07:34:13 +00:00
hsbt c3d27b5979 Added initial gemspec for Date module.
[Feature #13183]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 08:38:54 +00:00
kazu 8edb6ce4f7 {ext,test}/date: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-27 00:29:21 +00:00
nobu 65e27c8b13 parse.y: ambiguous parentheses
* parse.y (parser_yylex): warn ambiguous parentheses after a space
  in method definitions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 10:47:43 +00:00
usa 9c9c46e5a3 * ext/date/date_parse.c (date_zone_to_diff): it's nonsence and really
harm that to use unary minus operator with unsigned value.
  get rid of test failures introduced at r56312.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-01 14:12:34 +00:00