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

303 Коммитов

Автор SHA1 Сообщение Дата
nobu 3a47cf3395 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 11:55:52 +00:00
naruse 63f39fcb40 * random.c (random_rand): remove unused variables.
* struct.c (rb_struct_define_without_accessor): ditto.

* strftime.c (rb_strftime_with_timespec): ditto.

* sprintf.c: ditto.

* time.c (time_asctime): remove useless GetTimeval().

* thread_pthread.c: cast to (void *) for %p.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-25 07:56:42 +00:00
naruse 48de1e292a * addr2line.c: suppressed shorten-64-to-32 warnings.
* regcomp.c: ditto.
* regexec.c: ditto.
* regint.h: ditto.
* regparse.c: ditto.
* regparse.h: ditto.
* time.c: ditto.
* variable.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 03:44:57 +00:00
akr 0858cbf3fd update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-18 14:05:39 +00:00
akr 76fe9e893c update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-17 17:00:36 +00:00
akr 9f21d18b39 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-17 16:02:13 +00:00
akr cf869bc14d * time.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-27 10:12:48 +00:00
nobu 2451d735a7 * time.c (leap_year_v_p): fixed typo. [ruby-dev:42631]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-27 09:08:29 +00:00
naruse 33356ff75b * time.c (time_zone): use rb_locale_str_new_cstr to set encoding
as locale and convert its content to internal encoding.
  [ruby-core:33278]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-22 05:25:15 +00:00
nobu 7735e63593 * array.c (rb_ary_and, rb_ary_or), class.c (rb_mod_init_copy),
gc.c (undefine_final), time.c (time_mload): get rid of
  type-punning casts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 22:22:18 +00:00
akr b698066bbd update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-19 11:36:23 +00:00
nobu 25b9eb5e57 * include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]
add parent member.

* error.c (rb_typeddata_inherited_p): new function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18 07:31:54 +00:00
akr 4acc8102eb update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-17 16:12:49 +00:00
nobu 048d2e6d32 * ext/dbm/dbm.c (struct dbmdata, fdbm_key, fdbm_delete_if): fixed
type warnings.

* time.c (calc_tm_yday): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-16 07:40:37 +00:00
akr b782aea75f * time.c (guess_local_offset): use the UTC offset of an older date on
64bit time_t environment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-14 21:05:00 +00:00
akr 8ffda7cd14 * time.c (localtime_with_gmtoff_zone): renamed from
localtime_with_gmtoff and return the timezone abbreviation name.
  (guess_local_offset): return the isdst and timezone abbreviation name.
  (localtimew): use the returned isdst and timezone abbreviation name.
  [ruby-core:31275]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-14 15:38:30 +00:00
akr 9c9cef7fe3 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-10 11:26:54 +00:00
akr 98e949f7f8 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-09 12:21:43 +00:00
akr 00f97ed41a * time.c (find_time_t): 24:00 should be the beginning of the next
day even if the leap second, 23:59:60, exists.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-09 11:33:46 +00:00
akr 74d40e4196 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-08 14:39:09 +00:00
akr c2e127a768 document %g and %G for Time#strftime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-08 13:05:17 +00:00
akr a5d37d10a9 * strftime.c (rb_strftime_with_timespec): support %:z and %::z.
[ruby-dev:41841]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 21:07:01 +00:00
akr bf8cec6db1 * time.c (num_exact): fix for mathn. [ruby-dev:41599]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-22 14:13:09 +00:00
naruse 051af24359 * time.c (rb_localtime_r2): fix mixed declarations and code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-12 16:40:25 +00:00
akr 8c7786bf58 * time.c (init_leap_second_info): check the result of
gmtime_with_leapsecond.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-11 14:26:57 +00:00
akr 22ce9f81c3 * time.c (find_time_t): test the result of LOCALTIME.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-10 22:37:40 +00:00
akr cb962c5ae5 * time.c (rb_localtime_r2): fix localtime overflow check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-10 15:45:34 +00:00
akr 094ca0281e * time.c (rb_localtime_r2): refine localtime overflow check for
FreeBSD 6.4.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-10 14:10:25 +00:00
akr 82e646ea7a * time.c (find_time_t): always outerpolate from past.
[ruby-core:30672] reported by Benoit Daloze.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-09 13:54:03 +00:00
akr 2a1d97cc1f * time.c (calc_tm_yday): extracted from timegmw_noleapsecond.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-09 13:13:44 +00:00
nobu 45f6fbf339 * removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29 18:51:39 +00:00
marcandre 914efd0b60 * proc.c (proc_lambda, unnamed_parameters): Small documentation fixes.
* re.c: ditto

* string.c: ditto

* time.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17 21:07:46 +00:00
marcandre 7729de4d91 * array.c: Documentation: change => in call-seq to ->.
Harmonize "#=>" in examples. [ruby-core:30206]

* bignum.c: ditto

* class.c: ditto

* compar.c: ditto

* cont.c: ditto

* dir.c: ditto

* encoding.c: ditto

* enum.c: ditto

* enumerator.c: ditto

* error.c: ditto

* eval.c: ditto

* file.c: ditto

* gc.c: ditto

* io.c: ditto

* load.c: ditto

* marshal.c: ditto

* math.c: ditto

* numeric.c: ditto

* object.c: ditto

* pack.c: ditto

* proc.c: ditto

* process.c: ditto

* random.c: ditto

* range.c: ditto

* re.c: ditto

* ruby.c: ditto

* signal.c: ditto

* sprintf.c: ditto

* string.c: ditto

* struct.c: ditto

* thread.c: ditto

* time.c: ditto

* transcode.c: ditto

* variable.c: ditto

* vm_eval.c: ditto

* vm_method.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17 21:07:33 +00:00
akr a00247f57a * time.c (rb_big_abs_find_minbit): use ffs().
* configure.in: check ffs().

* missing/ffs.c: new file.

* include/ruby/missing.h (ffs): declared.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-12 13:23:20 +00:00
usa c76b8fcac1 * time.c (rb_big_abs_find_minbit): get rid of a warning of VC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-10 05:13:56 +00:00
nobu fadc3a8bbc * time.c (rb_localtime_r2): get rid of infinite loop bug of
localtime() on x86_64-darwin.  [ruby-core:30031]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06 08:16:45 +00:00
usa f6a5c0fae2 * time.c (TIMET_MAX): should be time_t, not unsigned_time_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-29 19:10:00 +00:00
usa 3543491916 * time.c (rb_time_unmagnify_to_float): should cast.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-29 18:59:18 +00:00
nobu f510d9f3c4 * time.c (time_timespec): use rb_check_funcall.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28 09:04:51 +00:00
akr 8f8e4e5ab5 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-11 06:56:28 +00:00
akr 082480dfe4 * time.c (ASCTIME): unused macro removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-07 12:45:02 +00:00
akr 2bbeb4c0ad * configure.in: test localtime(3) overflow. [ruby-dev:40910]
* time.c (rb_gmtime_r): renamed from rb_gmtime.
  (rb_localtime_r): renamed from rb_localtime.
  (rb_localtime_r2): call rb_localtime_r and validate the result if
  there is overflow problem.
  (rb_gmtime_r2): call rb_gmtime_r and validate the result if there
  is overflow problem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06 13:03:43 +00:00
akr 782e379f29 * time.c (cmp): optimize for fixnums.
(lt): use cmp.
  (gt): ditto.
  (le): ditto.
  (ge): ditto.
  (wlt): use wcmp.
  (wgt): ditto.
  (wle): ditto.
  (wge): ditto.
  (time_subsec): use wmod.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-04 13:20:29 +00:00
akr 9c50406bd5 * time.c (lt): call <=> instead of <.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-04 00:45:02 +00:00
akr 8587c246e9 * time.c: don't define STRUCT_WIDEVAL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-03 13:48:37 +00:00
akr c97f5f514a * time.c (rb_big_abs_find_minbit): fix handling the last word.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-31 19:56:04 +00:00
akr e758c3fbce * time.c (long_mul): overflow condition changed.
(wi_mul): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-31 19:31:08 +00:00
akr 6024074540 * time.c (long_mul): extracted from mul and avoid integer overflow.
(wi_mul): extracted from wmul and avoid integer overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-31 14:35:13 +00:00
akr fbc42054e8 * time.c: less bignum allocations.
* strftime.c (rb_strftime_timespec): defined to avoid rational for
  nano second resolution time.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-31 12:34:31 +00:00
akr 0da3fc65db * time.c (timew2timespec): fix previous change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-30 21:57:53 +00:00