akr
b9e0294eda
fix typos.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03 17:46:28 +00:00
marcandre
705c567194
* string.c: rdoc for <=>, casecmp
...
* bignum.c: rdoc for <=>
* file.c: ditto
* time.c: ditto
* compar.c: rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 04:50:09 +00:00
matz
9b192302ec
* time.c (rb_time_succ): make Time#succ obsolete since time is not
...
a discrete value.
* range.c (discrete_object_p): treat time objects specially to
determine discrete values, since time objects have #succ yet are
discrete (for now at least).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-30 08:32:43 +00:00
nobu
bb09904691
* time.c: fixed type.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23 04:16:41 +00:00
akr
87105a7da4
* time.c (time_mdump): error message refined.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-16 15:36:30 +00:00
nobu
fe963a4510
* time.c (rb_time_timeval, rb_time_timespec): typed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 04:06:37 +00:00
nobu
5c0a8e947a
* time.c (time_data_type): typed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 03:43:48 +00:00
akr
44320bc32c
* time.c (find_time_t): use mktime for the first guess.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-30 14:44:54 +00:00
akr
dcf2aad3a5
* time.c (add): shortcut implemented for fixnums.
...
(sub): ditto.
(mul): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-30 04:01:42 +00:00
akr
570d8f55b2
* time.c (eq): apply RTEST.
...
(ne): ditto.
(add): avoid method dispatch for bignums.
(sub): ditto.
(mul): ditto.
(mod): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-30 01:26:56 +00:00
akr
8b32a1de29
* timev.h (TIME_SCALE): defined as 1000000000.
...
(struct vtm): subsec is replaced by subsecx.
subsec * TIME_SCALE == subsecx.
* time.c: avoid rational in most cases.
(struct time_object): timev is replaced by timexv.
timev * TIME_SCALE == timexv.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-29 19:06:29 +00:00
akr
4a9bca2496
* time.c (init_leap_second_info): use TIMET_MAX.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-29 18:18:37 +00:00
nobu
9f66faa374
* time.c (init_leap_second_info): checks the result of gmtime to
...
suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22 15:09:50 +00:00
nobu
796fc30f84
* time.c (time_timespec): rounds subsecond toward zero.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12 16:18:18 +00:00
akr
b5279bb551
* time.c (find_time_t): fix Time.local(2009,2,31) failure on 64bit
...
time_t environment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-05 15:11:27 +00:00
akr
7eb5c0ac74
* time.c (find_time_t): less number of guesses for hh:mm:60.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-03 13:49:41 +00:00
akr
4e195adda5
* time.c (find_time_t): time guess strategy refined again.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-02 17:53:21 +00:00
akr
e8f835a10e
suppress a warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-02 15:42:18 +00:00
akr
26f32868c7
* time.c (find_time_t): time guess strategy refined.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-02 15:37:06 +00:00
nobu
432768449d
* time.c (num_exact): rb_check_to_integer() can deal with both of
...
Fixnum and Bignum together.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01 23:04:46 +00:00
akr
841cf3b948
* time.c (num_exact): use to_r for T_FLOAT.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01 20:38:57 +00:00
akr
36b84733f4
* time.c (quo): return an integer if possible.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01 20:17:00 +00:00
akr
2cb0c38014
unused variable removed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01 18:48:34 +00:00
akr
2f8b6234cd
* include/ruby/intern.h (rb_time_num_new): declared.
...
* time.c (nsec2timev): extracted from time_new_internal.
(time_new_internal): change argument to VALUE.
(rb_time_new): follow the argument change.
(rb_time_nano_new): ditto.
(rb_time_num_new): new function.
* ext/socket/ancdata.c (ancillary_timestamp): use rb_time_num_new to
represent struct bintime preciously.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01 12:11:53 +00:00
akr
c6480cd096
* time.c (time_s_now): new function. Time.now don't take arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-24 11:19:58 +00:00
matz
4f6bfb4a83
* time.c (time_strftime): update RDoc according to info from
...
Marc-Andre Lafortune in [ruby-core:23575]. [ruby-core:23564]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-27 18:44:54 +00:00
nobu
762fec4946
* time.c (rb_gmtime, rb_localtime): gmtime and localtime return
...
NULL on error. [ruby-core:23551]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-25 18:41:32 +00:00
mame
3465856922
* time.c (time_minus): always return a Float. [ruby-dev:38446]
...
* time.c (time_to_r): new method. [ruby-dev:38461]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-19 14:00:04 +00:00
akr
6727d4a14a
* time.c (time_init_1): unused variable removed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-12 18:21:18 +00:00
akr
f64e076260
* time.c: support fixed UTC offset. [ruby-dev:38326]
...
(leap_year_v_p): new macro.
(TIME_FIXOFF_P): new macro.
(TIME_SET_FIXOFF): new macro.
(time_init_0): renamed from time_init.
(time_set_utc_offset): new function.
(vtm_add_offset): new function.
(utc_offset_arg): new function.
(time_init_1): new function.
(time_init): call time_init_0 or time_init_1 according argc.
(validate_utc_offset): new function.
(time_localtime_m): new function.
(time_fixoff): new function.
(time_getlocaltime): take optional UTC offset argument.
(time_get_tm): support fixed UTC offset time.
(Init_Time): make Time#{initialize,localtime,getlocal} varargs.
* strftime.c (rb_strftime): vtm->zone can be NULL now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-12 12:07:49 +00:00
akr
d75996ec8a
* time.c (time_arg): unused variable removed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-26 10:30:54 +00:00
akr
0dae2c910f
* time.c (month_arg): extracted from time_arg.
...
(validate_vtm): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 07:20:20 +00:00
akr
939383275c
* time.c (TIME_COPY_GMT): new macro.
...
(time_s_at): use TIME_COPY_GMT.
(time_succ): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 07:04:02 +00:00
akr
c7cfaac668
* time.c (time_mload): use TIME_SET_UTC.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 06:54:49 +00:00
akr
c8f938d0b5
* time.c (time_get_tm): take time_object instead of gmt.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 06:48:39 +00:00
akr
4c2e943091
* time.c (time_succ): refactored to avoid gmt variable.
...
(strftimev): use TIME_UTC_P.
(time_strftime): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 06:40:59 +00:00
akr
afbb1ba21b
* time.c (TIME_UTC_P): new macro..
...
(TIME_SET_UTC): ditto.
(TIME_LOCALTIME_P): ditto.
(TIME_SET_LOCALTIME): ditto.
(time_utc_p): use the above macro.
(time_localtime): ditto.
(time_localtime): ditto.
(time_gmtime): ditto.
(time_to_s): ditto.
(time_add): ditto.
(time_sec): ditto.
(time_min): ditto.
(time_hour): ditto.
(time_mday): ditto.
(time_mon): ditto.
(time_year): ditto.
(time_wday): ditto.
(wday_p): ditto.
(time_yday): ditto.
(time_isdst): ditto.
(time_zone): ditto.
(time_utc_offset): ditto.
(time_to_a): ditto.
(strftimev): ditto.
(time_strftime): ditto.
(time_mdump): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 06:25:06 +00:00
nobu
a397887e58
* time.c (time_timespec): check out-of-range. [ruby-core:23282]
...
[Bug #1396 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-22 11:25:26 +00:00
usa
f50bcf9317
* time.c (GMTIME, LOCALTIME): should set result if not have *_r().
...
* time.c (localtime_with_gmtoff): now always needed tmbuf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-22 02:13:44 +00:00
usa
8da932fe46
* dir.c (glob_helper): C99(gcc)-ism.
...
* time.c (find_time_t): GUESS macro needs the variable named ``result''
always.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-22 01:40:09 +00:00
nobu
d5704eb61a
* time.c (localtime_with_gmtoff): fixed cross function jump.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-22 00:27:33 +00:00
akr
6df2f3d59c
add comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21 17:41:24 +00:00
akr
f67380be58
update rdoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21 17:16:11 +00:00
akr
16dc9e04cb
* time.c (time_arg): use the year argument as-is. [ruby-dev:38194]
...
* lib/time.rb (Time.parse): interpret small year 0..99 as 1950..2049.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21 16:43:15 +00:00
nobu
ac3dcc30da
* time.c (find_time_t): constified.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21 15:32:19 +00:00
akr
1dd6a6dfa4
* time.c (leap_year_v_p): removed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21 15:11:44 +00:00
akr
3bc16f62c1
* time.c: remove time_t restriction from Time class.
...
* timev.h: new file to define struct vtm.
* strftime.c: format struct vtm instead of struct tm.
* ext/syck/rubyext.c (mktime_do): don't use time_t;
[ruby-dev:38191]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21 14:56:59 +00:00
akr
29983664fc
* time.c (time_cmp): negate the result of reverse comparison.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-26 16:35:18 +00:00
akr
4a0bb2dc48
* time.c (time_timespec): use NUM2TIMET.
...
(time_s_at): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-23 13:02:12 +00:00
akr
d1bc6cc720
* time.c (time_mload): don't clear tm_mday.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 12:23:41 +00:00