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

208 Коммитов

Автор SHA1 Сообщение Дата
kazu ffb34cce89 fix typos [ci skip]
* 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
2016-05-20 13:21:55 +00:00
nobu 4a9705d6e3 ruby.h: RB_INTEGER_TYPE_P
* 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
2016-05-18 01:17:43 +00:00
nobu f56a2c7293 date_core.c: [DOC] markdown to rdoc [ci skip]
* 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
2016-04-23 02:21:29 +00:00
yui-knk a17dfde333 * ext/date/date_core.c : remove not used f_getlocal macro.
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
2016-04-16 05:25:59 +00:00
yui-knk 3fa0fc6931 * ext/date/date_core.c : remove not used f_utc6 macro.
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
2016-04-16 05:14:13 +00:00
nobu 456523e2ed date_core.c: preserve timezone
* 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
2016-04-12 11:40:37 +00:00
akr 9d8ef4ea20 Update dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11 11:50:00 +00:00
nobu add0ae5103 date_core.c: fix indent
* 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
2016-03-31 02:33:51 +00:00
nobu f85ff1ed83 date_core.c: fix DateTime rdoc
* 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
2016-03-31 02:18:21 +00:00
nobu 0f4c580b20 date_core.c: unused variable
* 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
2016-03-24 04:27:35 +00:00
nobu 8d23c8bf3b date_core.c: append strings
* 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
2016-03-24 03:43:28 +00:00
nobu c85040d4d0 date_core.c: fix jisx0301 and iso8601
* 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
2016-03-24 03:43:06 +00:00
nobu c4f51b71e3 date_core.c: fix inspect
* 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
2016-03-24 03:42:37 +00:00
sonots 5f11a6eb6c * ext/date/date_core.c (datetime_to_time): preserve timezone info
[Bug #12189] [Fix GH-1295]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-18 01:26:12 +00:00
naruse c4fdfabcc8 handle ext/ as r53141
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
2015-12-16 05:31:54 +00:00
nobu 08753137de date_core.c: missing argument check
* 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
2015-12-08 00:03:21 +00:00
nobu 6e19fc30b1 suppress warnings
* 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
2015-11-08 05:54:29 +00:00
nobu 57e2877e7b ext: use RARRAY_AREF
* 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
2015-11-05 01:09:17 +00:00
nobu 3553a86eb5 ext: use RARRAY_CONST_PTR
* 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
2015-11-04 07:27:10 +00:00
nobu 52912db4a8 ext: adjust index type
* 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
2015-11-04 07:18:01 +00:00
nobu de2d45100d extconf.rb: strict_warnflags
* 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
2015-10-21 00:35:50 +00:00
nobu 603cdc2710 check INFINITY and NAN without C99 option
* 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
2015-10-19 16:29:31 +00:00
nobu e4d0f54b1b date_parse.c: use ALLOCV
* 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
2015-06-16 09:46:06 +00:00
nobu d1496e8b8c date_strptime.c: use ALLOCV
* 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
2015-06-16 09:45:50 +00:00
zzak 7b91efd7f3 * ext/date/date_core.c: Grammar fix found by @aiperon [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12 14:45:56 +00:00
nobu 847e919e81 ext/date/date_core.c: [DOC] fold long paragraphs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 23:07:49 +00:00
zzak c10df9b698 [DOC] Decrease heading under DateTime [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 22:46:32 +00:00
zzak 45458752d3 * ext/date/date_core.c: [DOC] Add comparison of Time and DateTime
Patch provided by @pixeltrix


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 19:49:03 +00:00
nobu bb96ab6fb6 mkmf.rb: methods to append flags
* lib/mkmf.rb (append_cppflags, append_cflags, append_ldflags):
  utility methods to append compiler options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11 02:00:02 +00:00
nobu aceb11dff4 mkmf.rb: fix werror option
* lib/mkmf.rb (try_compile): pass the given werror flag to try_do
  to check if stderr is empty.
* lib/mkmf.rb (try_cflags, try_ldflags): default werror to true.
* win32/Makefile.sub (WERRORFLAG): remove useless option.  VC does
  not make warnings of unknown command option an error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 13:29:23 +00:00
nobu 54264f534a ext/date: reject unknown compiler option
* ext/date/extconf.rb: check warnings.
* lib/mkmf.rb (try_cflags): pass options to try_compile.
* win32/Makefile.sub (WERRORFLAG): make unknown command line
  options an error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 02:44:12 +00:00
naruse 0a321b21fa fix r50104 [Bug #10906]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-28 02:30:17 +00:00
naruse 4651b848e1 * ext/date/extconf.rb: try_cflags("-std=iso9899:1999") [Bug #10906]
ruby itself (including numeric.c) is built with strict compile
  options including -std=iso9899:1999, but ext/date is not.
  By the way -std=iso9899:1999 is not only a warning option but also
  changes behavior like MACRO definitions for example INFINITY.
  gcc on Solaris affect this.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-28 00:23:58 +00:00
akr ecedd3b224 Update dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19 13:34:54 +00:00
nobu e580a631be use 0 for reserved
use 0 for rb_data_type_t::reserved instead of NULL, since its type
may be changed in the future and possibly not a pointer type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 06:38:04 +00:00
akr 6ca202fcee Update dependency.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 03:04:44 +00:00
akr dd547e1b22 Mark auogenerated part.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:14:08 +00:00
akr 57682b05e1 * common.mk: Remove comments in Dependency lines.
Notified by usa.

* enc/depend: Ditto.

* ext/**/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 10:28:25 +00:00
akr 8727eb77be * tool/update-deps: Extend to fix dependencies.
* common.mk: Dependencies updated by tool/update-deps.

* enc/depend: Ditto.

* ext/**/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 05:15:49 +00:00
zzak 2f00c56eb7 * ext/date/lib/date.rb: fix indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 20:16:07 +00:00
zzak 6769d5d5ac * ext/date/date_core.c: [DOC] Clean up whitespace, examples, and typos
in date_core based on a patch by @vipulnsward [Fixes GH-724]
  https://github.com/ruby/ruby/pull/724


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 18:21:41 +00:00
nobu b5de461a49 date_core.c: revert const
* ext/date/date_core.c (SimpleDateData, ComplexDateData): revert
  const for aggregation assignments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-29 02:20:56 +00:00
nobu cedc0d1f6e date_core.c: more write-barriers
* ext/date/date_core.c (SimpleDateData, ComplexDateData): constify
  VALUE members to find out missing write-barriers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-29 01:45:11 +00:00
nobu 036acdab02 date_core.c: write-barrier
* ext/date/date_core.c (d_lite_type): add write-barrier.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-29 00:49:18 +00:00
nobu e912c167d2 date_core.c: typed data
* ext/date/date_core.c (d_lite_type): turn into typed data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-29 00:49:12 +00:00
nobu 1d670ab0f0 ext: prefer RB_TYPE_P over comparison TYPE with constants
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-03 01:56:01 +00:00
hsbt f8a38a36eb * ext/date/lib/date/format.rb: removed empty file by @vipulnsward.
* ext/date/lib/date.rb: removed needless require.
  [fix GH-647]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 02:28:56 +00:00
akr e56d2c385a * include/ruby/ruby.h: Hide Rational internal.
(RRational): Moved to internal.h
  (RRATIONAL): Ditto.
  (RRATIONAL_SET_NUM): Moved to rational.c.
  (RRATIONAL_SET_DEN): Ditto.

* rational.c (rb_rational_num): New function.
  (rb_rational_den): Ditto.

* include/ruby/intern.h (rb_rational_num): Declared.
  (rb_rational_den): Ditto.

*  ext/bigdecimal/bigdecimal.c: Follow the above change.

* ext/date/date_core.c: Ditto.

  [ruby-core:60665] [Feature #9513]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-17 16:37:41 +00:00
tadf a72f9f3476 * ext/date/date_core.c (rt_rewrite_frags): a new feature (not a
bug fix) of strptime.  applies offset even if the given date is
	  not local time (%s and %Q).  This is an exceptional feature and
	  I do NOT recommend to use this at all.  Thank you git community.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-04 20:56:28 +00:00
tadf bb05bcde01 * ext/date/date_strptime.c (date__strptime_internal): do not overwrite century.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-27 10:44:23 +00:00