summaryrefslogtreecommitdiff
path: root/pack.c
AgeCommit message (Collapse)Author
2005-02-28* exception error messages updated. [ruby-core:04497]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16* pack.c: all features are backport from 1.9. [ruby-dev:24826]gotoyuzo
* bignum.c (rb_big2ulong_pack): new function to pack Bignums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-14* ext/gdbm/gdbm.c (fgdbm_store): StringValue() may alter stringmatz
pointer. [ruby-dev:24783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-10* dir.c (rb_glob2): do not allocate buffer from heap to avoidmatz
memory leaks. use string object for buffering instead. [ruby-dev:24738] * dir.c (join_path): ditto. * io.c (io_read): external input buffer may be modified even after rb_str_locktmp(). [ruby-dev:24735] * dir.c (fnmatch): p or s may be NULL. [ruby-dev:24749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-08* pack.c (pack_pack): pointer modification check before eachmatz
iteration. [ruby-dev:24445] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-07* pack.c (pack_unpack): string conversion should at the top of thematz
method. [ruby-dev:24439] * io.c (io_read): buffer should be frozen only after the length check. [ruby-dev:24440] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-09* array.c, enum.c, pack.c: rdoc patch from Johan Holmbergocean
<holmberg@iar.se> [ruby-core:3132] [ruby-core:3136] * numeric.c: rdoc patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-13* pack.c (pack_pack): always add with null for 'Z'.nobu
* pack.c (pack_unpack): terminated by null for 'Z'. [ruby-talk:98281] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-06* eval.c (rb_mod_modfunc): should break if m has no super class.matz
[ruby-dev:22498] * backport changes from 1.9 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-26* io.c (next_argv): warn always for stdin on inplace edit mode.matz
* io.c (read_all): need to check string value. * io.c (argf_read): allow ARGF.read(nil). [ruby-dev:22433] * io.c (rb_f_backquote): need not to check nil result. [ruby-core:02078] * io.c (rb_io_getline): should return nil when read_all gives empty string, even when nil rs is specified. [ruby-core:02077] * pack.c (pack_pack): add sign check for 'i', and 'l'. [ruby-dev:22427] * bignum.c (rb_quad_pack): add range check for 'quad int'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-23* io.c (read_all): do not return nil at the end of file.matz
[ruby-dev:22334] * io.c (argf_read): do not depend on nil at eof behavior of IO#read(). * eval.c (rb_thread_join): dup exception before re-raising it. * io.c (rb_io_eof): call clearerr() to prevent side effect. this patch is supplied by Masahiro Sakai <sakai@tom.sfc.keio.ac.jp>. [ruby-dev:22234] * pack.c (OFF16): get offset for big endian machines. * pack.c (pack_pack): use OFF16 instead of OFF16B. [ruby-dev:22344] * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-23* pack.c (pack_pack): remove unnecessary negative value check.matz
[ruby-dev:22329] * io.c (rb_io_ungetc): need fflush before ungetc if write buffer is filled. [ruby-dev:22330] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-18Annotate enum.c. Add pager support, and report on methods in included modulesdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-08* pack.c: define swap16 and swap32 only if they are notmatz
defined. OpenBSD defines these macros. [ruby-dev:22181] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-01* pack.c (htov16): converts endian using swap16. htov32(), hton16,matz
hton32 as well. [ruby-talk:85377] * pack.c (swap16): swap 2 bytes no matter how big short is on the platform. swap32() is also prepared. * numeric.c (rb_num2int): returns long to preserve information. rb_fix2int(), rb_num2uint(), rb_fix2uint() as well. [ruby-talk:85377] * numeric.c (rb_num2uint): should not check for value range if the source value is negative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* marshal.c (r_object0): remove unnecessary iv restoration formatz
USRMARSHAL. [ruby-dev:21582] * marshal.c (w_object): dump generic instance variables from a string from '_dump'. * variable.c (rb_generic_ivar_table): return 0 if obj's FL_EXIVAR is not set. * time.c (time_dump): copy instance variables to dumped string, to be included in the marshaled data. * bignum.c (rb_big2ulong): add range check to ensure round trip. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* pack.c (uv_to_utf8): change message to "out of range", sincematz
negative values are not "too big". [ruby-dev21567] * marshal.c (w_object): should pass the value of "weak" to w_object(). [ruby-dev:21555] and [ruby-dev:21561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4729 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-06-23* string.c (rb_str_upto): generate sequence according to "succ"matz
order. formerly check was done by dictionary order. [ruby-talk:74138] * string.c (rb_string_value): fill constant empty string along with setting ELTS_SHARED if str->ptr is NULL. [ruby-core:01179] * string.c (rb_string_value_ptr): ditto. * string.c (rb_check_string_type): ditto. * string.c (str_gsub): move END(0) check before mbclen2(). * string.c (scan_once): reduce END(0) check. * io.c (rb_io_initialize): accept fixnum mode. * eval.c (error_print): replace strchr() by memchr(), einfo may contain "\0". * pack.c (pack_unpack): range check for "@" move; initialize check for "m". * error.c (syserr_initialize): avoid buffer overflow. * file.c (rb_file_s_readlink): expand buffer until readlink succeed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-23* pack.c (pack_unpack): sign-extend if sizeof long is bigger thannobu
32. (ruby-bugs-ja:PR#472) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-07* ext/socket/socket.c (sock_s_unpack_sockaddr_in): remove structmatz
size check. getnameinfo(3) can handle. [ruby-dev:19967] * io.c (io_read): do not call rb_sys_fail() when required data length is zero. (ruby-bugs-ja PR#420) * eval.c (umethod_proc): should raise TypeError, instead of returning error causing Proc. Following the principle of "fail early". [ruby-core:00927] * pack.c (pack_pack): small but serious typo. * eval.c (backtrace): skip internal allocator frame. (ruby-bugs-ja PR#416) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29* pack.c (pack_pack): do not call rb_str_buf_cat() with NULL ptr,matz
which causes SEGV; jump to grow instead. [ruby-dev:19944] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-16Updated Copyrights of Matz to 2003.michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-14* parse.y (list_append): avoid O(n) search using node->nd_next->nd_end.matz
* parse.y (list_append): ditto. * eval.c (rb_eval): NODE_ARRY nd_end adoption. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-10* pack.c (utf8_limits): fix the limit of 4 bytes UTF-8 sequence.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-10* sprintf.c (rb_f_sprintf): preceding ".." for negative numbersmatz
still left; removed. * sprintf.c (rb_f_sprintf): should not prepend '0' if width > prec for example "%5.3d". * process.c (Init_process): add Process.exit and Process.abort * pack.c (utf8_to_uv): raise ArgumentError for malformed/redundant UTF-8 sequences. * process.c (last_status_set): add pid attribute to Process::Status. * pack.c (uv_to_utf8): limit maximum length of the encoded string to 6 bytes, even when the platform supports 8 bytes long integers. * pack.c (utf8_to_uv): do not decode sequences longer than 6 bytes. * object.c (copy_object): use "copy_object" method, not "become". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-04* object.c (copy_object): copy finalizers as well if any.matz
* gc.c (rb_gc_copy_finalizer): new function to copy finalizers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-02* pack.c (utf8_to_uv): added checks for malformed or redundantmatz
UTF-8 sequences. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-22* sprintf.c (rb_f_sprintf): preceding ".." for negativematz
hexadecimal numbers should not appear if prec (e.g. %.4) is specified. * pack.c (NUM2I32): support platforms which does not have 32bit integers (e.g. Cray). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28Int vs Long cleanup #3 (ruby-core:352)michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21*.c: Int vs Long cleanupmichal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-28* pack.c (pack_unpack): change names of local variables because theirusa
names are overlapped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-29* parse.y: yyparse #defines moved from intern.hmatz
* ruby.c (proc_options): access prefixed "ruby_yydebug". * applied modifies to pacify some of gcc -Wall warnings. * parse.y (arg): no more ugly hack for "**", so that "-2**2" to be parsed as "(-2)**2", whereas "- 2**2" or "-(2)**2" to be parsed as "-(2**2)". * parse.y (yylex): '-2' to be literal fixnum. [new] * time.c (time_succ): new method for Range support. * time.c (time_arg): nil test against v[6] (usec). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-28 * array.c: fixed format string for 'long' args (%d -> %ld).michal
* class.c: ditto. * eval.c: ditto. * numeric.c: ditto. * pack.c: ditto. * parse.y: ditto. * range.c: ditto. * string.c: ditto. * util.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-21* object.c (Init_Object): should do exact match for Module#==.matz
* compar.c (cmp_eq): returns 'false' if <=> returns 'nil'. * compar.c (cmp_gt,cmp_ge,cmp_lt,cmp_le,cmp_between): ditto. * pack.c (pack_pack): should propagate taintedness. * pack.c (pack_unpack): ditto. * eval.c (rb_thread_schedule): need to preserve errno before calling rb_trap_exec(). * regex.c (calculate_must_string): a bug in charset/charset_not parsing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-14* eval.c (rb_clear_cache_by_class): new function.matz
* eval.c (set_method_visibility): should have clear cache forq updated visibility. * numeric.c (flo_to_s): default format precision to be "%.16g". * util.c (ruby_strtod): use own strtod(3) implementation to avoid locale hell. Due to this change "0xff".to_f no longer returns 255.0 * eval.c (avalue_to_yvalue): new function to distinguish yvalue (no-arg == Qundef) from svalue (no-arg == Qnil). * eval.c (rb_yield_0): use avalue_to_yvalue(). * eval.c (assign): warn if val == Qundef where it means rhs is void (e.g. yield without value or call without argument). * parse.y (value_expr): need not to warn for WHILE and UNTIL, since they can have return value (via valued break). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-25* various files: macro fix-up by Michal Rokos.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-15* pack.c (pack_unpack): should treat 'U' in character unit, not inmatz
byte unit. * error.c (exc_initialize): should clear backtrace information. * io.c (rb_io_fptr_cleanup): should close IO created by IO.new(fd). * rubyio.h: remove FMODE_FDOPEN git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-21* pack.c (pack_pack): wrong # comment treatment.matz
* pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-18* pack.c (pack_pack): avoid infinite loop at comment.nobu
* pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-18* parse.y (expr_value, arg_value, primary_value): value_expr()matz
check in place. * eval.c (block_pass): "&nil" should clear block given. * dir.c (push_braces): remove MAXPATHLEN dependency. * dir.c (dir_s_globd): ditto. * dln.c (init_funcname): ditto. * dln.c (load_1): ditto. * dln.c (dln_load): ditto. * configure.in: add GNU/Hurd switches. * pack.c (pack_pack): allows comment in template strings. * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-13* parse.y (stmt): local variable declaration order was changedmatz
since 1.6 * parse.y (arg): ditto. * pack.c (pack_pack): add templates 'q' and 'Q'. * pack.c (pack_unpack): ditto. * bignum.c (rb_quad_pack): new utility function. * bignum.c (rb_quad_unpack): ditto. * parse.y (assignable): should emit CVASGN within the method body. * dir.c (dir_s_glob): should not warn even if no match found. * eval.c (rb_eval): clean up class variable behavior. * eval.c (assign): ditto. * eval.c (is_defined): ditto. * variable.c (rb_mod_class_variables): need not to call rb_cvar_singleton(). * variable.c (rb_cvar_singleton): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-19* parse.y (parse_regx): should raise error on untermitatedmatz
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
2001-09-03* ruby.c (proc_options): should not alter origargv[].matz
* ruby.c (set_arg0): long strings for $0 dumped core. * ruby.c (set_arg0): use setprogtitle() if it's available. * io.c (rb_io_popen): accept integer flags as mode. * file.c (rb_find_file_ext): extension table can be supplied from outside. renamed. * eval.c (rb_f_require): replace rb_find_file_noext by rb_find_file_ext. * eval.c (rb_provided): should also check feature without extension. * numeric.c (flo_to_s): do not rely on decimal point to be '.' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-06a problem about `associated' String and `str_buf'.nobu
* pack.c (pack_unpack): associates p/P strings once at last(reverted to 1.26). * string.c (rb_str_associate): associates an Array at once, not but a String. realloc's when str_buf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-06* string.c (rb_str_lstrip_bang): new method.matz
* string.c (rb_str_rstrip_bang): new method. * string.c (rb_str_associate): should consider STR_ASSOC too. * eval.c (rb_undefined): do not recurse if method_missing is undefined. * process.c (proc_waitpid): now all arguments are optional. * process.c (Init_process): waitpid is now alias to wait. * process.c (Init_process): waitpid2 is now alias to wait2. * process.c (rb_waitpid): made public. * ext/pty/pty.c (pty_getpty): avoid disturbing SIGCHLD using thread and rb_waitpid. * process.c (proc_getpgrp): now takes no argument on all platforms. * process.c (proc_setpgrp): ditto. * ext/socket/socket.c (sock_s_pack_sockaddr_in): added Socket::pack_sockaddr_in(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_un): added Socket::pack_sockaddr_un(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_in): added Socket::unpack_sockaddr_in(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_un): added Socket::unpack_sockaddr_un(). [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-30* ruby.c (proc_options): unexpected SecurityError happens when -T4.matz
* regex.c (re_compile_pattern): * \1 .. \9 should be backreferences always. * regex.c (re_match): backreferences corresponding to unclosed/unmatched parentheses should fail always. * string.c (rb_str_cat): use rb_str_buf_cat() if possible. [new] * string.c (rb_str_append): ditto. * string.c (rb_str_buf_cat): remove unnecessary check (type, taint, modify) to gain performance. * string.c (rb_str_buf_append): ditto. * string.c (rb_str_buf_new): buffering string function. [new] * string.c (rb_str_buf_append): ditto. * string.c (rb_str_buf_cat): ditto. * time.c (make_time_t): local time adjustment revised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-02* eval.c (block_pass): should not downgrade safe level.matz
* ext/dbm/extconf.rb: allow specifying dbm-type explicitly. * ext/dbm/extconf.rb: avoid gdbm if possible, because it leaks memory, whereas gdbm.so doesn't. potential incompatibility. * string.c (rb_str_insert): new method. * parse.y (yylex): lex_state after RESCUE_MOD should be EXPR_BEG. * array.c (rb_ary_insert): new method. * array.c (rb_ary_update): new utility function. * io.c (set_outfile): should check if closed before assignment. * eval.c (rb_eval): should preserve value of ruby_errinfo. * eval.c (rb_thread_schedule): infinite sleep should not cause dead lock. * array.c (rb_ary_flatten_bang): proper recursive detection. * eval.c (yield_under): need not to prohibit at safe level 4. * pack.c (pack_pack): p/P packs nil into NULL. * pack.c (pack_unpack): p/P unpacks NULL into nil. * pack.c (pack_pack): size check for P template. * ruby.c (set_arg0): wrong predicate when new $0 value is bigger than original space. * gc.c (id2ref): should use NUM2ULONG() * object.c (rb_mod_const_get): check whether name is a class variable name. * object.c (rb_mod_const_set): ditto. * object.c (rb_mod_const_defined): ditto. * marshal.c (w_float): precision changed to "%.16g" * eval.c (rb_call0): wrong retry behavior. * numeric.c (fix_aref): a bug on long>int architecture. * eval.c (rb_eval_string_wrap): should restore ruby_wrapper. * regex.c (re_compile_pattern): char class at either edge of range should be invalid. * eval.c (handle_rescue): use === to compare exception match. * error.c (syserr_eqq): comparison between SytemCallErrors should based on their error numbers. * eval.c (safe_getter): should use INT2NUM(). * bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long. * regex.c (calculate_must_string): wrong length calculation. * eval.c (rb_thread_start_0): fixed memory leak. * parse.y (none): should clear cmdarg_stack too. * io.c (rb_fopen): use setvbuf() to avoid recursive malloc() on some platforms. * file.c (rb_stat_dev): device functions should honor stat field types (except long long such as dev_t). * eval.c (rb_mod_nesting): should not push nil for nesting array. * eval.c (rb_mod_s_constants): should not search array by rb_mod_const_at() for nil (happens for singleton class). * class.c (rb_singleton_class_attached): should modify iv_tbl by itself, no longer use rb_iv_set() to avoid freeze check error. * variable.c (rb_const_get): error message "uninitialized constant Foo at Bar::Baz" instead of "uninitialized constantBar::Baz::Foo". * eval.c (rb_mod_included): new hook called from rb_mod_include(). * io.c (opt_i_set): should strdup() inplace_edit string. * eval.c (exec_under): need to push cref too. * eval.c (rb_f_missing): raise NameError for "undefined local variable or method". * error.c (Init_Exception): new exception NoMethodError. NameError moved under ScriptError again. * eval.c (rb_f_missing): use NoMethodError instead of NameError. * file.c (Init_File): should redifine "new" class method. * eval.c (PUSH_CREF): sharing cref node was problematic. maintain runtime cref list instead. * eval.c (rb_eval): copy defn node before registering. * eval.c (rb_load): clear ruby_cref before loading. * variable.c (rb_const_get): no recursion to show full class path for modules. * eval.c (rb_set_safe_level): should set safe level in curr_thread as well. * eval.c (safe_setter): ditto. * object.c (rb_obj_is_instance_of): nil belongs to false, not true. * time.c (make_time_t): proper (I hope) daylight saving time handling for both US and Europe. I HATE DST! * eval.c (rb_thread_wait_for): non blocked signal interrupt should stop the interval. * eval.c (proc_eq): class check aded. * eval.c (proc_eq): typo fixed ("return" was ommitted). * error.c (Init_Exception): move NameError under StandardError. * class.c (rb_mod_clone): should copy method bodies too. * bignum.c (bigdivrem): should trim trailing zero bdigits of remainder, even if dd == 0. * file.c (check3rdbyte): safe string check moved here. * time.c (make_time_t): remove HAVE_TM_ZONE code since it sometimes reports wrong time. * time.c (make_time_t): remove unnecessary range check for platforms where negative time_t is available. * process.c (proc_waitall): should push Process::Status instead of Finuxm status. * process.c (waitall_each): should add all entries in pid_tbl. these changes are inspired by Koji Arai. Thanks. * process.c (proc_wait): should not iterate if pid_tbl is 0. * process.c (proc_waitall): ditto. * numeric.c (flodivmod): a bug in no fmod case. * process.c (pst_wifsignaled): should apply WIFSIGNALED for status (int), not st (VALUE). * io.c (Init_IO): value of $/ and $\ are no longer restricted to strings. type checks are done on demand. * class.c (rb_include_module): module inclusion should be check taints. * ruby.h (STR2CSTR): replace to StringType() and StringTypePtr(). * ruby.h (rb_str2cstr): ditto. * eval.c (rb_load): should not copy topleve local variables. It cause variable/method ambiguity. Thanks to L. Peter Deutsch. * class.c (rb_include_module): freeze check at first. * eval.c (rb_attr): sprintf() and rb_intern() moved into conditional body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-26* eval.c: remove TMP_PROTECT_END to prevent C_ALLOCA crash.matz
* file.c (rb_file_flock): do not trap EINTR. * missing/flock.c (flock): returns the value from lockf(2) directly. * eval.c (ev_const_defined): should ignore toplevel cbase (Object). * eval.c (ev_const_get): ditto. * ext/md5/md5.h: replace by independent md5 implementation contributed by L. Peter Deutsch (thanks). * ext/md5/md5init.c: adopted to Deutsch's md5 implementation. * pack.c (pack_unpack): string from P/p should be tainted. * ext/curses/curses.c: curses on Mac OS X public beta does not have _maxx etc. * marshal.c (w_object): should truncate trailing zero short for bignums. * object.c (sym_intern): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-29* string.c (str_independent): should not clear str->orig here.matz
it's too early. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e