nobu
413f24d3b0
* whitespace cleanup.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-04 07:19:23 +00:00
drbrain
9edfa89744
* time.c (Init_Time): Remove editorial comments from Time
...
documentation, fix link.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-06 00:17:41 +00:00
drbrain
0d900cecdf
* time.c (Init_Time): Improve Time documentation. Patch by Shane
...
Emmons. [Ruby 1.9 - Bug #5404 ]
* lib/time.rb: Improve time.rb documentation including Time.strptime.
Patch by Shane Emmons. [Ruby 1.9 - Bug #5402 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-06 00:14:55 +00:00
nobu
8e6e8e6288
* use RB_TYPE_P which is optimized for constant types, instead of
...
comparison with TYPE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-29 11:07:45 +00:00
akr
cf7d76f0bc
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-09 23:14:00 +00:00
naruse
6bc83a18b7
* internal.h (rb_strftime_timespec): moved from time.c and define only
...
if ruby/encoding.h is included.
* internal.h (rb_strftime): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27 10:06:25 +00:00
naruse
7412263eba
* internal.h (rb_strftime_timespec): move to time.c because it depends
...
encoding.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27 09:45:15 +00:00
naruse
23b2808693
* strftime.c (rb_strftime_with_timespec): get enc argument to specify
...
the encoding of the format. On Windows (at least Japanese Windows),
Time#strftime("%Z") includes non ASCII in locale encoding (CP932).
So convert locale to default internal. [ruby-core:39092] [Bug #5226 ]
* strftime.c (rb_strftime): ditto.
* strftime.c (rb_strftime_timespec): ditto.
* internal.h (rb_strftime_timespec): follow above.
* time.c (rb_strftime_alloc): ditto.
* time.c (strftimev): ditto.
* time.c (time_strftime): ditto.
* time.c (time_to_s): the resulted string of Time#to_s is always
ascii only, so this should be US-ASCII.
* time.c (time_asctime): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27 09:18:18 +00:00
tenderlove
4544b3824c
* time.c (strftimev): Make Time#to_s default to US-ASCII encoding but
...
respect Encoding.default_internal. [ruby-core:39092]
* test/ruby/test_time.rb (class TestTime): Corresponding test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-25 23:24:33 +00:00
akr
2fa6ebc64d
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-25 16:39:37 +00:00
kosaki
f2f14f572d
* time.c (rb_strftime_alloc): raise ERANGE if width is too large.
...
Patch by Nobuyoshi Nakada. [Bug #4457 ] [ruby-dev:43285]
* test/ruby/test_time.rb (class TestTime): add a test for the
above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-07 14:38:17 +00:00
nobu
e2fd80b3d3
* error.c (rb_check_trusted): new function to check an object is
...
trusted.
* struct.c (rb_struct_modify), time.c (time_modify): check by the
above function to show proper class names. [Bug #5036 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-17 07:26:45 +00:00
kosaki
6270ce85ed
* time.c (time_dup): used rb_obj_class() instead of CLASS_OF().
...
The patch is made by Kazuki Tsujimoto. [Bug #5012 ] [ruby-dev:44071]
* test/ruby/test_time.rb (TestTime#test_getlocal_dont_share_eigenclass):
added a new test for eigenclass of time object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15 16:06:53 +00:00
kanemoto
2a5aa8cdaa
time.c: can't compile time.c on AIX due to missing declaration for
...
ffs(). It is declared in strings.h on AIX.
If I need to add something like '&& defined(_AIX)',
please let me know.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-11 14:29:45 +00:00
akr
5ed8c08aa0
* eval.c, hash.c, load.c, proc.c, range.c, thread.c, time.c: don't
...
declare internal functions.
* internal.h, vm_core.h: declare internal functions.
* array.c: include internal.h.
* common.mk: update dependency for array.o.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18 08:26:19 +00:00
akr
afd7e4668f
* internal.h: declare more internal functions.
...
* iseq.h (rb_method_get_iseq): declared.
* compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c,
ruby.c, time.c, util.c, vm.c: don't declare internal functions.
* eval.c, parse.y, thread_pthread.c: non-existing function declarations
removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18 01:54:57 +00:00
akr
e7996eb3cc
* internal.h: declare internal functions here.
...
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 22:43:38 +00:00
naruse
f45d127ada
* time.c (rb_time_new): prevent overflow by "* 1000".
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 19:46:08 +00:00
tadf
35c16fe35f
* time.c: a correction of doc for strftime (%v).
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11 13:42:35 +00:00
nobu
8137c55558
* time.c (rb_gmtime_r2): adjust indent.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-07 04:50:34 +00:00
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