aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * time.c: new method `gmtoff', `gmt_offset' and `utc_offset'.akr2001-12-174-27/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (time_utc_offset): new function. (Init_Time): bind above methods to `time_utc_offset'. * time.c: 64bit time_t support. (time_s_at): use NUM2LONG instead of NUM2INT for tv_sec. (time_arg): initialize tm_isdst correctly. use long to initialize tm_year. (search_time_t): renamed from `make_time_t'. (make_time_t): call `timegm' and `mktime' instead of `search_time_t' if availabe. (time_to_i): use LONG2NUM instead of INT2NUM. (time_localtime): check localtime failure. (time_gmtime): check gmtime failure. (time_year): use LONG2NUM instead of INT2FIX. (time_to_a): use long for tm_year. (time_dump): check tm_year which is not representable with 17bit. (time_load): initialize tm_isdst. * configure.in: check existence of `mktime' and `timegm'. check existence of tm_gmtoff field of struct tm. fix negative time_t for 64bit time_t. * missing/strftime.c: fix overflow by tm_year + 1900. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-12-138-133/+156
| | | | | | | | | | | | * lib/net/pop.rb: new method Net::POP3.APOP * lib/net/http.rb: set default Content-Type to x-www-form-urlencoded (causes warning) * lib/net/protocol.rb: remove Net::NetPrivate module. * lib/net/smtp.rb: ditto. * lib/net/pop.rb: ditto. * lib/net/http.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_new_internal): avoid loop to calculate negativematz2001-12-135-22/+51
| | | | | | | | | | | | div, mod. * time.c (time_cmp): should handle Bignums. * array.c (rb_ary_pop): should ELTS_SHARED flag check before REALLOC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_match_m): should convert an argument intomatz2001-12-1110-6/+203
| | | | | | | | | | | | | | | | | | | | | | regexp if it's a string. * array.c (rb_ary_select): Array#select(n,m,...) now works like Array#indexes(n,m,..). [new, experimental] * hash.c (rb_hash_select): ditto. * hash.c (env_select): ditto. * re.c (match_select): ditto. * struct.c (rb_struct_select): ditto. * gc.c (STR_ASSOC): use FL_USER3 instead of FL_USER2. * parse.y (str_extend): make up pushback call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_class_real): follow included modules.nobu2001-12-102-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * util.h: change prototype of ruby_qsort() to accord with its definition.usa2001-12-102-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (gettable): should freeze __FILE__ string.eban2001-12-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add lib/time.rb.akr2001-12-101-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* auxiliary routines update.matz2001-12-102-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_modify): should copy the internal buffer if thematz2001-12-1019-336/+653
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modifying buffer is shared. * array.c (ary_make_shared): make an internal buffer of an array to be shared. * array.c (rb_ary_shift): avoid sliding an internal buffer by using shared buffer. * array.c (rb_ary_subseq): avoid copying the buffer. * parse.y (gettable): should freeze __LINE__ string. * io.c (rb_io_puts): old behavoir restored. rationale: a) if you want to call to_s for arrays, you can just call print a, "\n". b) to_s wastes memory if array (and sum of its contents) is huge. c) now any object that has to_ary is treated as an array, using rb_check_convert_type(). * hash.c (rb_hash_initialize): now accepts a block to calculate the default value. [new] * hash.c (rb_hash_aref): call "default" method to get the value corrensponding to the non existing key. * hash.c (rb_hash_default): get the default value based on the block given to 'new'. Now it takes an optinal "key" argument. "default" became the method to get the value for non existing key. Users may override "default" method to change the hash behavior. * hash.c (rb_hash_set_default): clear the flag if a block is given to 'new' * object.c (Init_Object): undef Data.allocate, left Data.new. * ext/curses/curses.c (window_scrollok): use RTEST(). * ext/curses/curses.c (window_idlok): ditto. * ext/curses/curses.c (window_keypad): ditto. * ext/curses/curses.c (window_idlok): idlok() may return void on some platforms; so don't use return value. * ext/curses/curses.c (window_scrollok): ditto for consistency. * ext/curses/curses.c: replace FIX2INT() by typechecking NUM2INT(). * parse.y (str_extend): should not process immature #$x and #@x interpolation, e.g #@#@ etc. * enum.c (enum_sort_by): sort_by does not have to be stable always. * enum.c (enum_sort_by): call qsort directly to gain performance. * util.c (ruby_qsort): ruby_qsort(qs6) is now native thread safe. * error.c (rb_sys_fail): it must be a bug if it's called when errno == 0. * regex.c (WC2MBC1ST): should not pass through > 0x80 number in UTF-8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1896 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
* 20011209nobu2001-12-091-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * matrix.rb: Vector#* bug. reported from Massimiliano Mirrakeiju2001-12-092-2/+6
| | | | | | | <info@chromatic-harp.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_sort_by): should replace with last elements.nobu2001-12-092-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-12-098-191/+301
| | | | | | | * lib/net/protocol.rb: calls on_connect before conn_command git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-12-075-44/+47
| | | | | | | | | | | * lib/net/smtp.rb: SMTP.new requires at least one arg. * lib/net/pop.rb: POP.new requires at least one arg. * lib/net/pop.rb: uses "raise *Error.new" instead of simple raise. * lib/net/http.rb: HTTP.new requires at least one arg. * lib/net/http.rb: changes implicit start algolithm. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/extmk.rb.in: ignore adding -Wl,-R to DLDFLAGS when the directoryusa2001-12-072-1/+6
| | | | | | | is $topdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/extmk.rb.in: add -Wl,-R flags to DLDFLAGS on netbsdelf.usa2001-12-063-0/+12
| | | | | | | * lib/mkmf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* replace have_header("curses") with have_header("curses.h")ttate2001-12-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2001-12-03eban2001-12-031-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_plus): must detect result overflow.matz2001-12-033-77/+117
| | | | | | | | | | | | | | | | | | | | * time.c (time_minus): ditto. * time.c (time_new_internal): round usec overflow and underflow here. * time.c (time_plus): move operand overflow/underflow check to time_new_internal(). * time.c (time_minus): ditto. * time.c (time_cmp): should consider tv_usec too. * time.c (time_gmtime): time_modify() should be called even if tm struct is not calculated yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: add -Wl,-export-dynamic on NetBSD.eban2001-12-032-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: remove -L/usr/local/lib.eban2001-12-032-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: not use X11BASE, since it's not always set.usa2001-12-032-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: apply patch from NetBSD's pkgsrc (patch-aa).usa2001-12-022-14/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: use GCC, not without_gcc. remove without_gcc.eban2001-12-024-12/+18
| | | | | | | | * ext/curses/extconf.rb: check for curses.h. * ext/dbm/extconf.rb: check if $CFLAGS includes DBM_HDR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* One more fix to use Digest::MD5.knu2001-12-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Reflect the update of the MD5 module which is now Digest::MD5.knu2001-12-015-21/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: default --enable-shared to yes on cygwin and mingw32.eban2001-11-301-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: set target_cpu to i386 on cygwin and mingw32.eban2001-11-302-1/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bug fix for getnstr() and wgetnstr()ttate2001-11-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_equal): object with to_str must be treated as amatz2001-11-295-3/+31
| | | | | | | string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * README.EXT: Appendix B is duplicated.usa2001-11-293-2/+8
| | | | | | | * README.EXT.ja: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_select): should subtract timeofday() frommatz2001-11-286-54/+89
| | | | | | | | | | | | | | limit, not reverse. * util.c (scan_hex): x is not a hexadecimal digit. * eval.c (rb_thread_schedule): should treat the case that select(2) returns 0, if a thread is under both WAIT_SELECT and WAIT_TIME. Jakub Travnik <J.Travnik@sh.cvut.cz> actually fixed this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_float): must distinguish -0.0 from 0.0.matz2001-11-279-83/+301
| | | | | | | | | | | | | | | | | * gc.c (gc_mark_all): tweak mark order for little bit better scan. * gc.c (rb_gc_mark): ditto. * gc.c (rb_gc): ditto. * enum.c (sort_by_i): slight performance boost. * gc.c (gc_mark_rest): should call gc_mark_children(), not gc_mark(). * gc.c (rb_gc_mark): may cause infinite looop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Import the "syslog" module from the rough ruby project. This moduleknu2001-11-2612-0/+723
| | | | | | | provides the interface to the UNIX system logger (syslog). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (mypopen): fixed that mypclose() didn't really closeusa2001-11-262-26/+82
| | | | | | | | | | pipe. * win32/win32.c (CreateChild): set STARTF_USESTDHANDLES flag only when some handles are passed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2001-11-25usa2001-11-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (str_extend): change types of second and third argumentsusa2001-11-252-2/+7
| | | | | | | from char to int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Curses::getstr and Window#getstr use getnstr() and wgetnstr()ttate2001-11-232-3/+11
| | | | | | | if they are available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2001-11-22eban2001-11-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (str_extend): should check nesting parentheses in #{}.matz2001-11-2110-56/+181
| | | | | | | | | | | | | | | | | | | | | | | | | * process.c (pst_wstopsig): returns nil unless WIFSTOPPED() is non-zero. * process.c (pst_wtermsig): returns nil unless WIFSIGNALED() is non-zero. * process.c (pst_wexitstatus): returns nil unless WIFEXITED() is non-zero. * eval.c (rb_thread_select): tv_sec and tv_usec should not be negative. * signal.c (posix_signal): do not set SA_RESTART for SIGVTALRM. * parse.y (call_args2): block_arg may follow the first argument in call_args2. * eval.c (stack_check): should avoid stack length check during raising SystemStackError exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb: CGI#header: do not set Apache.request.status forshugo2001-11-212-1/+8
| | | | | | | Location: if Apache.request.status is already set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2001-11-20eban2001-11-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (str_extend): should not terminate string interpolationmatz2001-11-193-1/+14
| | | | | | | with newlines in here-docs and newline terminated strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_modfunc): should follow NODE_ZSUPER link; basedmatz2001-11-196-11/+36
| | | | | | | | | | | on Guy Decoux's patch in [ruby-talk:25478]. * string.c (rb_str_succ): there was buffer overrun. * parse.y (str_extend): term can be any character. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parse_regx): should raise error on untermitatedmatz2001-11-1925-297/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expression interpolation. * pack.c (pack_unpack): should give length to utf8_to_uv(). * pack.c (utf8_to_uv): add length check. * massages: replace "wrong #" by "wrong number". * marshal.c (w_float): output Infinity and NaN explicitly. * marshal.c (r_object): support new explicit float format. * eval.c (rb_thread_wait_for): select may cause ERESTART on Solaris. * eval.c (rb_thread_select): ditto. * array.c (rb_ary_join): dumped core if sep is not T_STRING nor T_NIL. * array.c (rb_ary_join): buffer size calculattion was wrong. * array.c (rb_ary_to_s): if rb_output_fs is nil, insert newlines between array elements (use rb_default_rs as newline litral) [experimental]. * gc.c (init_mark_stack): no need to clear mark_stack. * gc.c (gc_mark_all): need to handle finalizer mark. * gc.c (gc_mark_rest): use MEMCPY instead of memcpy. * gc.c (rb_gc_mark): earlier const check to avoid pusing special constants into mark stack. * numeric.c (fix_to_s): 'to_s' now takes optional argument to specify radix. [new] * bignum.c (rb_big_to_s): ditto. [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb (header): support for Apache. thanks towakou2001-11-182-0/+9
| | | | | | | Shugo Maeda <shugo@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: needless conditionals.nobu2001-11-183-9/+12
| | | | | | | | * parse.y (parse_regx): parse error at unterminated regex /#{. (ruby-bugs-ja:PR#142) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 20011115nobu2001-11-151-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e