summaryrefslogtreecommitdiff
path: root/util.c
AgeCommit message (Collapse)Author
2008-10-26* thread.c (blocking_region_{begin,end}): declared as inline.nobu
* util.c (freedtoa): used only when MULTIPLE_THREADS is not defined. * win32/win32.c (rb_w32_pipe): serial is DWORD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24* util.c (freedtoa): made static to get rid of name clash. a patch bynobu
Tadashi Saito <shiba AT mail2.accsnet.ne.jp> at [ruby-dev:36913] * util.c (ruby_dtoa): added prefix, ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports MS-DOS.yugui
* ext/sdbm/_sdbm.c: ditto. * ext/sdbm/sdbm.h: ditto. * gc.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/util.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * strftime.c: ditto. * util.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.yugui
* djgpp/README.djgpp: ditto. * djgpp/config.hin: ditto. * djgpp/config.sed: ditto. * djgpp/configure.bat: ditto. * djgpp/mkver.sed: ditto. * ext/Setup.dj: ditto. * dln.c: removed djgpp supports. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * signal.c: ditto. * util.c: ditto. * vm_core.h: ditto. * lib/fileutils.rb: ditto. * lib/mkmf.rb: ditto. * ext/socket/socket.c: ditto. * test/fileutils/test_fileutils.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_path.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12* sprintf.c, util.c (quorem, nrv_alloc, dtoa): enabled floating pointnobu
support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10* util.c (ruby_strtod): ruby_strtod don't allow a trailingwanabe
decimal point like "7.". [ruby-dev:34835] [ruby-dev:35009] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko1
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-07* io.c (rb_f_open), re.c (rb_reg_search), transcode.c (str_transcode):nobu
suppress warnings. * util.c (quorem, rv_alloc, nrv_alloc): only used in dtoa(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05* st.c (st_reverse_foreach): comment out unused function.mame
* util.c (dtoa): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01* util.c (ruby_strtod, dtoa): initialize more variables for errornobu
handling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31* suppress warnings with -Wwrite-string.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-26* util.c (ruby_strtod): clear errno at the top of our ownmatz
impelementation of strtod(3). [ruby-dev:34834] [ruby-dev:34839] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-23* debug.c (ruby_set_debug_option): separated ruby_each_words().nobu
* util.c (ruby_each_words): extracted from ruby_set_debug_option(). * ruby.c (proc_options): generalized enable/disable options. * ruby.c (ruby_init_gems): take enabled flag. [ruby-core:14840] * ruby.c (process_options): added --disable-rubyopt flag. * include/ruby/util.h (ruby_each_words): prototype. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-23* util.c (valid_filename): use O_EXCL to get rid of clobberingnobu
existing files in race conditions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03downcase MUL_OVERFLOW. it is a local variable.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-02* util.c (ruby_strtoul): "0x", "+" and "-" is not a valid integer.akr
end of integer should be just after "0", the beginning, the beginning respectively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-02use signed char explicitly for table in scan_digits.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-02* util.c (ruby_strtoul): locale independent strtoul is implemented toakr
avoid "i".to_i(36) cause 0 under tr_TR locale. This is newly implemented, not a copy of missing/strtoul.c. * include/ruby/ruby.h (ruby_strtoul): declared. (STRTOUL): defined to use ruby_strtoul. * bignum.c, pack.c, ext/socket/socket.c: use STRTOUL. * configure.in (strtoul): don't check. * missing/strtoul.c: removed. * include/ruby/missing.h (strtoul): removed. * common.mk (strtoul.o): removed. * LEGAL (missing/strtoul.c): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27* util.c (IEEE_BIG_ENDIAN): use configured value. [ruby-dev:31623]nobu
* util.c (Llong): set to LONG_LONG if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* encoding.c: provide basic features for M17N.matz
* parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22* util.c: updated for ANSI C only. applied a patch frommatz
<snakagawa AT infoteria.co.jp>. [ruby-dev:31591] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21* util.c (ruby_strtod): replaced by the implementation by Davidmatz
M. Gay inspired by William D. Clinger's paper "How to Read Floating Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. a patch from Satoshi Nakagawa <snakagawa AT infoteria.co.jp>. [ruby-dev:31582] * test/ruby/test_float.rb (TestFloat::test_float): add test for precision. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-18* util.c (ruby_strtod): exponent is radix 10. [ruby-talk:248272]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19* regparse.c, etc.: K&R to ANSI code cleanup patch from Stefanmatz
Huehner <stefan at huehner.org>. [ruby-core:10543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-04* util.c (push_element): should return a int value.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-27* util.c (__crt0_glob_function): use ruby_glob() instead of rb_globi().eban
* configure.in (ac_cv_func_setrlimit): workaround for djgpp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31* file.c (test_identical, rb_file_s_truncate): use RSTRING_PTR andusa
RSTRING_STR. * io.c (pipe_open, rb_io_reopen): ditto. * process.c (proc_spawn_n, rb_spawn): ditto. * util.c (ruby_add_suffix): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-18* object.c (rb_cstr_to_dbl): limit out-of-range message.nobu
* util.c (ruby_strtod): return end pointer even if ERANGE occurred. fixed: [ruby-dev:29041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-17* util.c (ruby_strtod): stop at dot not followed by digits.nobu
fixed: [ruby-dev:29035] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-09* math.c (log2): may be a macro.nobu
* parse.y (args, block_param, f_args): pass f_post_arg to #params. * util.c (powersOf10): constified. * ext/readline/readline.c: include extconf.h first. * ext/ripper/eventids2.c: removed tLAMBDA_ARG. * ext/tk/tcltklib.c (lib_fromUTF8_core): removed conflict. * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_arg): rb_id2name() is defined as const now. * ext/win32ole/win32ole.c (fole_missing): ditto. * lib/mkmf.rb (create_makefile): force to create extconf header. * lib/optparse.rb (order!): use Proc#yield. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-09* sprintf.c (rb_str_format): allow %c to print one charactermatz
string (e.g. ?x). * lib/tempfile.rb (Tempfile::make_tmpname): put dot between basename and pid. [ruby-talk:196272] * parse.y (do_block): remove -> style block. * parse.y (parser_yylex): remove tLAMBDA_ARG. * eval.c (rb_call0): binding for the return event hook should have consistent scope. [ruby-core:07928] * eval.c (proc_invoke): return behavior should depend whether it is surrounded by a lambda or a mere block. * eval.c (formal_assign): handles post splat arguments. * eval.c (rb_call0): ditto. * st.c (strhash): use FNV-1a hash. * parse.y (parser_yylex): removed experimental ';;' terminator. * eval.c (rb_node_arity): should be aware of post splat arguments. * eval.c (rb_proc_arity): ditto. * parse.y (f_args): syntax rule enhanced to support arguments after the splat. * parse.y (block_param): ditto for block parameters. * parse.y (f_post_arg): mandatory formal arguments after the splat argument. * parse.y (new_args_gen): generate nodes for mandatory formal arguments after the splat argument. * eval.c (rb_eval): dispatch mandatory formal arguments after the splat argument. * parse.y (args): allow more than one splat in the argument list. * parse.y (method_call): allow aref [] to accept all kind of method argument, including assocs, splat, and block argument. * eval.c (SETUP_ARGS0): prepare block argument as well. * lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931] * eval.c (error_line): print receivers true/false/nil specially. * eval.c (rb_proc_yield): handles parameters in yield semantics. * eval.c (nil_yield): gives LocalJumpError to denote no block error. * io.c (rb_io_getc): now takes one-character string. * string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo hashing algorithm. * string.c (rb_str_aref): str[0] now returns 1 character string, instead of a fixnum. [Ruby2] * parse.y (parser_yylex): ?c now returns 1 character string, instead of a fixnum. [Ruby2] * string.c (rb_str_aset): no longer support fixnum insertion. * eval.c (umethod_bind): should not update original class. [ruby-dev:28636] * eval.c (ev_const_get): should support constant access from within instance_eval(). [ruby-dev:28327] * time.c (time_timeval): should round for usec floating number. [ruby-core:07896] * time.c (time_add): ditto. * dir.c (sys_warning): should not call a vararg function rb_sys_warning() indirectly. [ruby-core:07886] * numeric.c (flo_divmod): the first element of Float#divmod should be an integer. [ruby-dev:28589] * test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder. * re.c (rb_reg_initialize): should not allow modifying literal regexps. frozen check moved from rb_reg_initialize_m as well. * re.c (rb_reg_initialize): should not modify untainted objects in safe levels higher than 3. * re.c (rb_memcmp): type change from char* to const void*. * dir.c (dir_close): should not close untainted dir stream. * dir.c (GetDIR): add tainted/frozen check for each dir operation. * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg): typo fixed. a patch from Florian Gross <florg at florg.net>. * eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from event_hooks. no guarantee for arbitrary hook deletion. [ruby-dev:28632] * util.c (ruby_strtod): differ addition to minimize error. [ruby-dev:28619] * util.c (ruby_strtod): should not raise ERANGE when the input string does not have any digits. [ruby-dev:28629] * eval.c (proc_invoke): should restore old ruby_frame->block. thanks to ts <decoux at moulon.inra.fr>. [ruby-core:07833] also fix [ruby-dev:28614] as well. * signal.c (trap): sig should be less then NSIG. Coverity found this bug. a patch from Kevin Tew <tewk at tewk.com>. [ruby-core:07823] * math.c (math_log2): add new method inspired by [ruby-talk:191237]. * math.c (math_log): add optional base argument to Math::log(). [ruby-talk:191308] * ext/syck/emitter.c (syck_scan_scalar): avoid accessing uninitialized array element. a patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07809] * array.c (rb_ary_fill): initialize local variables first. a patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07810] * ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free type_tag. a patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07808] * ext/socket/socket.c (make_hostent_internal): accept ai_family check from Sam Roberts <sroberts at uniserve.com>. [ruby-core:07691] * util.c (ruby_strtod): should not cut off 18 digits for no reason. [ruby-core:07796] * array.c (rb_ary_fill): internalize local variable "beg" to pacify Coverity. [ruby-core:07770] * pack.c (pack_unpack): now supports CRLF newlines. a patch from <tommy at tmtm.org>. [ruby-dev:28601] * applied code clean-up patch from Stefan Huehner <stefan at huehner.org>. [ruby-core:07764] * lib/jcode.rb (String::tr_s): should have translated non squeezing character sequence (i.e. a character) as well. thanks to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090] * ext/socket/socket.c: document update patch from Sam Roberts <sroberts at uniserve.com>. [ruby-core:07701] * lib/mathn.rb (Integer): need not to remove gcd2. a patch from NARUSE, Yui <naruse at airemix.com>. [ruby-dev:28570] * parse.y (arg): too much NEW_LIST() * eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen. * eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1. [ruby-dev:28585] * parse.y (arg): use NODE_ARGSCAT for placeholder. * lib/getoptlong.rb (GetoptLong::get): RDoc update patch from mathew <meta at pobox.com>. [ruby-core:07738] * variable.c (rb_const_set): raise error when no target klass is supplied. [ruby-dev:28582] * prec.c (prec_prec_f): documentation patch from <gerardo.santana at gmail.com>. [ruby-core:07689] * bignum.c (rb_big_pow): second operand may be too big even if it's a Fixnum. [ruby-talk:187984] * README.EXT: update symbol description. [ruby-talk:188104] * COPYING: explicitly note GPLv2. [ruby-talk:187922] * parse.y: remove some obsolete syntax rules (unparenthesized method calls in argument list). * eval.c (rb_call0): insecure calling should be checked for non NODE_SCOPE method invocations too. * eval.c (rb_alias): should preserve the current safe level as well as method definition. * process.c (rb_f_sleep): remove RDoc description about SIGALRM which is not valid on the current implementation. [ruby-dev:28464] Thu Mar 23 21:40:47 2006 K.Kosako <sndgk393 AT ybb.ne.jp> * eval.c (method_missing): should support argument splat in super. a bug in combination of super, splat and method_missing. [ruby-talk:185438] * configure.in: Solaris SunPro compiler -rapth patch from <kuwa at labs.fujitsu.com>. [ruby-dev:28443] * configure.in: remove enable_rpath=no for Solaris. [ruby-dev:28440] * ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior of converting OLE Variant object with VT_ARRAY|VT_UI1 and Ruby String object. * ruby.1: a clarification patch from David Lutterkort <dlutter at redhat.com>. [ruby-core:7508] * lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems directories. a patch from Eric Hodel <drbrain at segment7.net>. [ruby-core:07423] * eval.c (rb_clear_cache_by_class): clearing wrong cache. * ext/extmk.rb: use :remove_destination to install extension libraries to avoid SEGV. [ruby-dev:28417] * eval.c (rb_thread_fd_writable): should not re-schedule output from KILLED thread (must be error printing). * array.c (rb_ary_flatten_bang): allow specifying recursion level. [ruby-talk:182170] * array.c (rb_ary_flatten): ditto. * gc.c (add_heap): a heap_slots may overflow. a patch from Stefan Weil <weil at mail.berlios.de>. * eval.c (rb_call): use separate cache for fcall/vcall invocation. * eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local functions. * eval.c (rb_mod_local): a new method to specify newly added visibility "local". * eval.c (search_method): search for local methods which are visible only from the current class. * class.c (rb_class_local_methods): a method to list local methods. * object.c (Init_Object): add BasicObject class as a top level BlankSlate class. * ruby.h (SYM2ID): should not cast to signed long. [ruby-core:07414] * class.c (rb_include_module): allow module duplication. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-17* util.c (ruby_strtod): Float("1e") should fail. [ruby-core:7330]ocean
* pack.c (EXTEND32): unpack("l") did not work where sizeof(long) != 4. [ruby-talk:180024] * pack.c (pack_unpack): fixed integer overflow on template "w". [ruby-talk:180126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-22* util.[hc] (ruby_add_suffix): constified.ocean
* util.[hc] (ruby_scan_{oct,hex}): fixed typo. (renamed from scan_{oct,hex}) * util.c: almostly ANSI styled. (except for functions depending on macro and K&R tecknique) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-11* array.c, enum.c, eval.c, util.c: safer function pointer usage.nobu
fixed: [ruby-core:06143] * util.h (qsort): removed the definition incompatible to ANSI. fixed: [ruby-core:06147] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]ocean
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c, gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h, node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h, rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c, util.c, util.h, variable.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-21* enum.c (enum_sort_by): do not use qsort directly. usematz
rb_ary_sort_bang() instead. [ruby-dev:24291] * enum.c (enum_sort_by): pedantic type check added. [ruby-dev:24291] * hash.c (rb_hash_foreach_iter): check iter_lev after each iteration. [ruby-dev:24289] * array.c (rb_ary_and): element size might change during comparison. [ruby-dev:24290] * array.c (rb_ary_or): ditto. [ruby-dev:24292] * array.c (rb_ary_equal): wrong fix. [ruby-dev:24286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-12* util.c (ruby_strdup): remove unnecessary code. (xmalloc neverocean
returns NULL.) * util.c (ruby_getcwd): fix memory leak on failure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-14* util.c (ruby_strtod): should not convert string in the form ofocean
"-I.FE-X" which both "I" and "F" are ommitted. [ruby-dev:23883] * test/ruby/test_float.rb (test_strtod): add test for bug fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-14* util.c (ruby_strtod): strtod("0", &end); => end should point '\0'.ocean
[ruby-dev:23498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07* util.c (ruby_strtod): 0.0000000000000000001 == 0.0 should be false.ocean
[ruby-talk:99318] [ruby-dev:23465] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-29* util.c (mblen): fix overrun. [ruby-dev:22672]eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-29* dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.matz
[ruby-dev:22761] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-21* defines.h: define RUBY_MBCHAR_MAX instead of MB_CUR_MAX.siena
* dir.c (Next, emx_mblen): use RUBY_MBCHAR_MAX for mblen(). * file.c (CharNext): ditto. * ruby.c (translate_char): ditto. * util.c (__crt0_glob_function): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22* gc.c (Init_stack): stack region is far smaller than usual ifmatz
pthread is used. * marshal.c (w_extended): singleton methods should not be checked when dumping via marshal_dump() or _dump(). [ruby-talk:85909] * file.c (getcwdofdrv): avoid using getcwd() directly, use my_getcwd() instead. * merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine <sunshine@sunshineco.com>. [ruby-core:01596] * marshal.c (w_object): LINK check earlier than anything else, i.e. do not dump TYPE_IVAR for already dumped objects. (ruby-bugs PR#1220) * eval.c (rb_eval): call "inherited" only when a new class is generated; not on reopening. * eval.c (eval): prepend error position in evaluating string to * configure.in: revived NextStep, OpenStep, and Rhapsody ports which had become unbuildable; enhanced --enable-fat-binary option so that it accepts a list of desired architectures (rather than assuming a fixed list), or defaults to a platform-appropriate list if user does not provide an explicit list; made the default list of architectures for MAB (fat binary) more comprehensive; now uses -fno-common even when building the interpreter (in addition to using it for extensions), thus allowing the interpreter to be embedded into a plugin module of an external project (in addition to allowing embedding directly into an application); added checks for <netinet/in_systm.h> (needed by `socket' extension) and getcwd(); now ensures that -I/usr/local/include is employed when extensions' extconf.rb scripts invoke have_header() since extension checks on NextStep and OpenStep will fail without it if the desired resource resides in the /usr/local tree; fixed formatting of --help message. * Makefile.in: $(LIBRUBY_A) rule now deletes the archive before invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives (see configure's --enable-fat-binary option); added rule for new missing/getcwd.c. * defines.h: fixed endian handling during MAB build (see configure's --enable-fat-binary option) to ensure that all portions of the project see the correct WORDS_BIGENDIAN value (some extension modules were getting the wrong endian setting); added missing constants GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H define in NeXT section. * dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on NextStep since, on some installations, this value always resolves uselessly to zero. * dln.c: added error reporting to NextStep extension loader since the previous behavior of failing silently was not useful; now ensures that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined for OpenStep and Rhapsody; no longer includes <mach-o/dyld.h> twice on Rhapsody since this header lacks multiple-include protection, which resulted in "redefinition" compilation errors. * main.c: also create hard reference to objc_msgSend() on NeXT platforms (in addition to Apple platforms). * lib/mkmf.rb: now exports XCFLAGS from configure script to extension makefiles so that extensions can be built MAB (see configure's --enable-fat-binary option); also utilize XCFLAGS in cc_command() (but not cpp_command() because MAB flags are incompatible with direct invocation of `cpp'). * ext/curses/extconf.rb: now additionally checks for presence of these curses functions which are not present on NextStep or Openstep: bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(), setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(), wscrl(), wsetscrreg() * ext/curses/curses.c: added appropriate #ifdef's for additional set of curses functions now checked by extconf.rb; fixed curses_bkgd() and window_bkgd() to correctly return boolean result rather than numeric result; fixed window_getbkgd() to correctly signal an error by returning nil rather than -1. * ext/etc/etc.c: setup_passwd() and setup_group() now check for null pointers before invoking rb_tainted_str_new2() upon fields extracted from `struct passwd' and `struct group' since null pointers in some fields are common on NextStep/OpenStep (especially so for the `pw_comment' field) and rb_tainted_str_new2() throws an exception when it receives a null pointer. * ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(). * ext/socket/getaddrinfo.c: cast first argument of getservbyname(), gethostbyaddr(), and gethostbyname() from (const char*) to non-const (char*) for older platforms such as NextStep and OpenStep. * ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(); include <netinet/in_systm.h> if present for NextStep and OpenStep; cast first argument of gethostbyaddr() and getservbyname() from (const char*) to non-const (char*) for older platforms. * ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-24* error.c (rb_warn_m): should not warn if -W0 is specified.matz
[ruby-talk:82675] * util.c (ruby_strtod): skip preceding zeros before counting digits in the mantissa. (ruby-bugs PR#1181) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-11* util.c (ruby_strtod): exp should be less than MDMAXEXPT.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-09* eval.c (rb_load): put rb_load_file() in a thread criticalmatz
section. [ruby-dev:20490] * eval.c (compile): put rb_compile_string() in a thread critical section. * variable.c (rb_const_get_0): should not warn if constant is not defined. (ruby-bugs-ja PR#509) * bignum.c (rb_big2dbl): give a warning on overflow. (ruby-bugs-ja PR#510) * util.c (ruby_strtod): change MDMAXEXPT from 511 to 308. * pack.c (utf8_to_uv): long is sufficient. LONG_LONG is not required. * bignum.c (rb_big2str): support 32 bit (without `long long' type) machines. (ruby-bugs-ja PR#512) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-27* eval.c, util.c: removed duplicated includes/defines.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e