aboutsummaryrefslogtreecommitdiffstats
path: root/lib/time.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* * lib/time.rb: r20251 reverted. The patched behavior do not roundmatz2008-11-241-28/+28
| | | | | | trip. [ruby-core:19988] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb: according to RFC2822, -0000 means local time, +0000matz2008-11-181-28/+28
| | | | | | means UTC. a patch from Chun Wang. [ruby-core:19578] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trailing spaces removed.akr2008-09-141-19/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (Time.xmlschema): don't accept decimal dot withoutakr2008-06-131-2/+7
| | | | | | | fractional digits. fractional digits handling simplified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (Time.xmlschema): don't use float. fixakr2008-06-051-1/+5
| | | | | | | http://rubyforge.org/tracker/index.php?func=detail&group_id=426&atid=1698&aid=20504 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb: do not reference Time directly from the inside oftadf2008-01-141-9/+9
| | | | | | | definitions. [ruby-dev:33059] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (Time.httpdate): fix 2 digits year for 20xx.akr2007-12-231-1/+10
| | | | | | | reported by Tadayoshi Funaba. [ruby-dev:32687] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (Time.httpdate): use Time.utc forakr2007-12-231-1/+1
| | | | | | | "day-of-week, dd-mon-yy HH::MM:SS GMT" format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix Time.parse to support nsec.akr2007-11-191-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check struct timespec, clock_gettime, utimensat,akr2007-11-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct stat.st_atim, struct stat.st_atimespec, struct stat.st_atimensec, struct stat.st_mtim, struct stat.st_mtimespec, struct stat.st_mtimensec, struct stat.st_ctim, struct stat.st_ctimespec, struct stat.st_ctimensec. * include/ruby/missing.h: provide struct timespec if not available. * time.c: support nanosecond-resolution using struct timespec. * include/ruby/intern.h: provide rb_time_nano_new. * file.c (utime_internal): use utimensat if available. (rb_file_s_utime): refactored. (rb_f_test): use stat_atime, stat_mtime, stat_ctime. (rb_stat_cmp): check tv_nsec. (stat_atimespec): new function. (stat_atime): ditto. (stat_mtimespec): ditto. (stat_mtime): ditto. (stat_ctimespec): ditto. (stat_ctime): ditto. (rb_stat_atime): use stat_atime. (rb_file_s_atime): ditto. (rb_file_atime): ditto. (rb_stat_mtime): use stat_mtime. (rb_file_s_mtime): ditto. (rb_file_mtime): ditto. (rb_file_ctime): use stat_ctime. (rb_file_s_ctime): ditto. (rb_stat_ctime): ditto. * variable.c (rb_copy_generic_ivar): clear clone's instance variables if obj has no instance variable. * marshal.c (w_object): dump instance variables of generated string for TYPE_USERDEF, even if original object has instance variables. * lib/time.rb (Time#xmlschema): use nsec instead of usec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_dup): duplicate the class of original time.matz2006-10-311-5/+5
| | | | | | | | | | [ruby-core:09357] * lib/time.rb (Time::make_time, Time::rfc2822, Time::httpdate): should respect subclasses. [ruby-core:09357] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb: require 'date/format' instead of 'parsedate'.akr2005-08-281-12/+27
| | | | | | | | | (Time.parse): extract fractional seconds using Date._parse. (Time.strptime): extract fractional seconds using Date._strptime. [ruby-talk:153859] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (Time.apply_offset): fix a problem with last day ofakr2005-08-191-1/+7
| | | | | | | month. reported by Lucas Nussbaum. [ruby-talk:152866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (Time.parse): fix previous leap seconds support.akr2005-06-171-25/+123
| | | | | | | | (Time.rfc2822): ditto. (Time.xmlschema): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests for leapseconds on an environment without leapseconds support.akr2005-06-161-29/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (Time.parse): "Fri Jan 1 08:59:60 +0900 1999" wasakr2005-06-161-4/+52
| | | | | | | | | | parsed as "Fri Jan 01 09:00:00 JST 1999" even on an environment which supports leap seconds. (Time.rfc2822): ditto. (Time.xmlschema): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: replace rb_protect_inspect() and rb_inspecting_p() bymatz2005-03-041-28/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rb_exec_recursive() in eval.c. * eval.c (rb_exec_recursive): new function. * array.c (rb_ary_join): use rb_exec_recursive(). * array.c (rb_ary_inspect, rb_ary_hash): ditto. * file.c (rb_file_join): ditto. * hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto. * io.c (rb_io_puts): ditto. * object.c (rb_obj_inspect): ditto * struct.c (rb_struct_inspect): ditto. * lib/set.rb (SortedSet::setup): a hack to shut up warning. [ruby-talk:132866] * lib/time.rb (Time::strptime): add new function. inspired by [ruby-talk:132815]. * lib/parsedate.rb (ParseDate::strptime): ditto. * regparse.c: move st_*_strend() functions from st.c. fixed some potential memory leaks. * exception error messages updated. [ruby-core:04497] * ext/socket/socket.c (Init_socket): add bunch of Socket constants. Patch from Sam Roberts <sroberts@uniserve.com>. [ruby-core:04409] * array.c (rb_ary_s_create): no need for negative argc check. [ruby-core:04463] * array.c (rb_ary_unshift_m): ditto. * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass of StandardError class, not Exception class. [ruby-core:04429] * parse.y (fcall_gen): lvar(arg) will be evaluated as lvar.call(arg) when lvar is a defined local variable. [new] * object.c (rb_class_initialize): call inherited method before calling initializing block. * eval.c (rb_thread_start_1): initialize newly pushed frame. * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. fixed: [ruby-core:04444] * eval.c (is_defined): NODE_IASGN is an assignment. * ext/readline/readline.c (Readline.readline): use rl_outstream and rl_instream. [ruby-dev:25699] * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check [ruby-dev:25675] * misc/ruby-mode.el: [ruby-core:04415] * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] * lib/rdoc/generators/ri_generator.rb: ditto. * struct.c (make_struct): fixed: [ruby-core:04402] * ext/curses/curses.c (window_color_set): [ruby-core:04393] * ext/socket/socket.c (Init_socket): SO_REUSEPORT added. [ruby-talk:130092] * object.c: [ruby-doc:818] * parse.y (open_args): fix too verbose warnings for the space before argument parentheses. [ruby-dev:25492] * parse.y (parser_yylex): ditto. * parse.y (parser_yylex): the first expression in the parentheses should not be a command. [ruby-dev:25492] * lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330] * object.c (Init_Object): remove Object#type. [ruby-core:04335] * st.c (st_foreach): report success/failure by return value. [ruby-Bugs-1396] * parse.y: forgot to initialize parser struct. [ruby-dev:25492] * parse.y (parser_yylex): no tLABEL on EXPR_BEG. [ruby-talk:127711] * document updates - [ruby-core:04296], [ruby-core:04301], [ruby-core:04302], [ruby-core:04307] * dir.c (rb_push_glob): should work for NUL delimited patterns. * dir.c (rb_glob2): should aware of offset in the pattern. * string.c (rb_str_new4): should propagate taintedness. * env.h: rename member names in struct FRAME; last_func -> callee, orig_func -> this_func, last_class -> this_class. * struct.c (rb_struct_set): use original method name, not callee name, to retrieve member slot. [ruby-core:04268] * time.c (time_strftime): protect from format modification from GC finalizers. * object.c (Init_Object): remove rb_obj_id_obsolete() * eval.c (rb_mod_define_method): incomplete subclass check. [ruby-dev:25464] * gc.c (rb_data_object_alloc): klass may be NULL. [ruby-list:40498] * bignum.c (rb_big_rand): should return positive random number. [ruby-dev:25401] * bignum.c (rb_big_rand): do not use rb_big_modulo to generate random bignums. [ruby-dev:25396] * variable.c (rb_autoload): [ruby-dev:25373] * eval.c (svalue_to_avalue): [ruby-dev:25366] * string.c (rb_str_justify): [ruby-dev:25367] * io.c (rb_f_select): [ruby-dev:25312] * ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072] * struct.c (make_struct): [ruby-dev:25249] * dir.c (dir_open_dir): new function. [ruby-dev:25242] * io.c (rb_f_open): add type check for return value from to_open. * lib/pstore.rb (PStore#transaction): Use the empty content when a file is not found. [ruby-dev:24561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb: recognize +00:00 and GMT as a localtime.akr2005-01-061-4/+28
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: use assert_raise instead of assert_raises.akr2004-02-111-58/+58
| | | | | | | | | | | | * lib/pp.rb: ditto. * lib/time.rb: ditto. * lib/tsort.rb: ditto. use TSortHash and TSortArray instead of Hash and Array in test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check ArgumentError by Time.at(-1) instead of by test itself.usa2004-01-171-3/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test.rb (test_rfc2822, test_rfc3339, test_encode_xmlschema):usa2004-01-171-14/+24
| | | | | | | should not expect that all platforms handle negative time_t value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2004-01-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* consistent parentheses in assignment RHS.matz2003-10-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* yyyy/mm is not an acceptable format.tadf2003-08-311-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * instruby.rb, ext/extmk.rb, lib/benchmark.rb, lib/cgi.rb,akr2003-03-291-4/+4
| | | | | | | | | lib/debug.rb, lib/getoptlong.rb, lib/optparse.rb, lib/time.rb, lib/date/format.rb, lib/irb/ruby-lex.rb lib/uri/common.rb: revert escape for `-' in character class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regex.c (re_compile_pattern): fix previous change.akr2003-03-211-2/+2
| | | | | | | | | | | * instruby.rb, ext/extmk.rb, ext/tk/lib/tk.rb, lib/benchmark.rb, lib/cgi.rb, lib/debug.rb, lib/getoptlong.rb, lib/jcode.rb, lib/optparse.rb, lib/time.rb, lib/date/format.rb, lib/irb/ruby-lex.rb: escape `[', `]', `-' in chracter class in regexp to avoid warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Converted RD to RDoc, with some changes/additions.gsinclair2003-01-211-175/+164
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: Use Test::Unit.akr2003-01-211-62/+60
| | | | | | | | | | | * lib/prettyprint.rb: Ditto * lib/time.rb: Ditto * lib/tsort.rb: Ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (Time.rfc2822, Time#rfc2822): preserve localtimeness.akr2002-08-241-3/+32
| | | | | | | * lib/pp.rb: pretty_print_cycled is renamed to pretty_print_cycle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* modify document.akr2002-04-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typo in documentation.akr2002-01-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (Time#xmlschema): new optional argumentakr2002-01-071-7/+26
| | | | | | | | fractional_seconds to specify a number of digits of fractional part of the time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb: date.rb is not required anymore.akr2001-12-181-1/+0
| | | | | | | * lib/resolv.rb: fix document. refine IPv6 regex. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb: use Time#utc_offset.akr2001-12-171-71/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* new file.akr2001-12-101-0/+628
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e