aboutsummaryrefslogtreecommitdiffstats
path: root/ext/date
Commit message (Collapse)AuthorAgeFilesLines
* Make string literal to frozen object on gemspec of defulte gems.hsbt2017-06-191-0/+1
| | | | | | | | | | | | 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
* date_core.c: fix docs for %Z formatstomar2017-05-091-2/+2
| | | | | | | | | | * 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
* ruby tool/update-deps --fixshyouhei2017-03-221-0/+3
| | | | | | | | | | | | | | 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
* date_core.c: fix error in DateTime docsstomar2017-03-191-12/+12
| | | | | | | | | | * 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
* date_core.c: expand docs for Date shiftingstomar2017-02-271-5/+43
| | | | | | | | | | | | * 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
* Fix a required ruby version on gemspec of gemified libraries.hsbt2017-02-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: [DOC] revise docs [ci skip]nobu2017-02-061-129/+135
| | | | | | | | | | | | | | | | * 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
* Added initial gemspec for Date module.hsbt2017-02-021-0/+17
| | | | | | [Feature #13183] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* {ext,test}/date: Specify frozen_string_literal: true.kazu2017-01-272-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: ambiguous parenthesesnobu2016-11-291-7/+7
| | | | | | | * 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
* * ext/date/date_parse.c (date_zone_to_diff): it's nonsence and reallyusa2016-10-011-1/+1
| | | | | | | | 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
* date_parse.c: str_end_withnobu2016-10-011-3/+10
| | | | | | | * ext/date/date_parse.c (str_end_with): extract to tell if a string ends with the other string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* zonetab.h: use strncmpnobu2016-10-013-6/+3
| | | | | | * ext/date/zonetab.h (zonetab): use strncmp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_parse.c: refactornobu2016-10-011-110/+59
| | | | | | | * ext/date/date_parse.c (date_zone_to_diff): refactor without allocating strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependenciesnobu2016-07-061-0/+1
| | | | | | | | * common.mk (compile.o, loadpath.o): update dependencies. * common.mk (vm_call.o): remove stale object dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: remove assertnobu2016-06-151-2/+0
| | | | | | | * ext/date/date_core.c (decode_jd): do not assert type of argument. just try to convert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: missing argumentnobu2016-06-151-1/+1
| | | | | | | * ext/date/date_core.c (d_lite_initialize): fix missing argument for write-barrier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_strftime.c: check precisionnobu2016-06-141-2/+7
| | | | | | | | * ext/date/date_strftime.c (date_strftime_with_tmx): reject too large precision to get rid of buffer overflow. reported by Guido Vranken <guido AT guidovranken.nl>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress static-in-inline warningnobu2016-06-082-2/+2
| | | | | | * ext/date/zonetab.list (zonetab): forward declaration as static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix date buildnobu2016-06-082-2/+2
| | | | | | | | | * common.mk (zonetabl.h): fix typo. * ext/date/zonetab.list: remove forward declaration which may be conflict with the later definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/date/zonetab.list: gperf timezone namesnobu2016-06-085-99/+1098
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/date: constifynobu2016-06-083-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2016-05-201-3/+3
| | | | | | | * ext/date/date_core.c: [DOC] fix typos. [fix GH-1360] patched by @soundasleep git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: RB_INTEGER_TYPE_Pnobu2016-05-181-2/+2
| | | | | | | | * include/ruby/ruby.h (RB_INTEGER_TYPE_P): new macro and underlying inline function to check if the object is an Integer (Fixnum or Bignum). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: [DOC] markdown to rdoc [ci skip]nobu2016-04-231-148/+136
| | | | | | | | * ext/date/date_core.c (Init_date_core): [DOC] Convert DateTime documentation to RDoc from Markdown. [ruby-core:75136] [Bug #12311] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c : remove not used f_getlocal macro.yui-knk2016-04-161-1/+0
| | | | | | After r54553 f_getlocal macro is not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c : remove not used f_utc6 macro.yui-knk2016-04-161-2/+0
| | | | | | After r54169 f_utc6 macro is not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: preserve timezonenobu2016-04-121-2/+2
| | | | | | | * ext/date/date_core.c (time_to_time): should preserve timezone info. [ruby-core:74889] [Bug #12271] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependencies.akr2016-04-111-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: fix indentnobu2016-03-311-48/+48
| | | | | | | * ext/date/date_core.c (d_lite_strftime, dt_lite_strftime): [DOC] fix indent not to be a big sole verbatim. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: fix DateTime rdocnobu2016-03-311-61/+61
| | | | | | | * ext/date/date_core.c (Init_date_core): [DOC] fix misplaced doc of DateTime. [ruby-core:74729] [Bug #12233] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: unused variablenobu2016-03-241-5/+2
| | | | | | | * ext/date/date_core.c (dt_lite_jisx0301): remove no longer used variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: append stringsnobu2016-03-241-2/+2
| | | | | | | * ext/date/date_core.c (dt_lite_iso8601): strftimev() always returns a String, so append them directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: fix jisx0301 and iso8601nobu2016-03-242-57/+61
| | | | | | | | * ext/date/date_core.c (d_lite_jisx0301, iso8601_timediv), (dt_lite_jisx0301): format by the format string in local buffer to prevent intermediate strings from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: fix inspectnobu2016-03-241-51/+27
| | | | | | | * ext/date/date_core.c (mk_inspect_raw, mk_inspect): inspect by "%+"PRIsVALUE, to prevent intermediate strings from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c (datetime_to_time): preserve timezone infosonots2016-03-181-4/+7
| | | | | | [Bug #12189] [Fix GH-1295] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* handle ext/ as r53141naruse2015-12-162-0/+2
| | | | | | | | g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: missing argument checknobu2015-12-081-6/+11
| | | | | | | * ext/date/date_core.c (d_lite_lshift): should check the argument before negation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warningsnobu2015-11-081-3/+3
| | | | | | | * ext/date/date_parse.c (date_zone_to_diff): suppress parentheses warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext: use RARRAY_AREFnobu2015-11-051-20/+20
| | | | | | | | * ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR. pointed out by hanmac. https://github.com/ruby/ruby/commit/3553a86#commitcomment-14187670 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext: use RARRAY_CONST_PTRnobu2015-11-041-20/+20
| | | | | | | * ext/bigdecimal/bigdecimal.c: use RARRAY_CONST_PTR just fore reference instead of RARRAY_PTR, to keep the array WB-protected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext: adjust index typenobu2015-11-041-14/+15
| | | | | | * ext: use long for index instead of int and RARRAY_LENINT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extconf.rb: strict_warnflagsnobu2015-10-211-0/+1
| | | | | | | * ext/date/extconf.rb: add strict warning flags same as ruby itself for C99 option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check INFINITY and NAN without C99 optionnobu2015-10-191-1/+0
| | | | | | | | * configure.in: check INFINITY and NAN without an option for C99 so that rb_infinity and rb_nan are respectively available regardless that option if they may be used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_parse.c: use ALLOCVnobu2015-06-161-6/+16
| | | | | | | * ext/date/date_parse.c (s3e, date_zone_to_diff, parse_ddd_cb): use ALLOCV instead of ALLOCA get rid of stack overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_strptime.c: use ALLOCVnobu2015-06-161-1/+3
| | | | | | | * ext/date/date_strptime.c (read_digits): use ALLOCV instead of ALLOCA get rid of stack overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c: Grammar fix found by @aiperon [ci skip]zzak2015-06-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/date/date_core.c: [DOC] fold long paragraphsnobu2015-05-311-7/+36
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] Decrease heading under DateTime [ci skip]zzak2015-05-311-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c: [DOC] Add comparison of Time and DateTimezzak2015-05-311-1/+60
| | | | | | | Patch provided by @pixeltrix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e