summaryrefslogtreecommitdiff
path: root/marshal.c
AgeCommit message (Collapse)Author
2008-06-18merge revision(s) 17396:shyouhei
* marshal.c (w_object, marshal_dump, r_object0, marshal_load): search public methods only. [ruby-core:17283] * object.c (convert_type): ditto. * lib/singleton.rb (Singleton#_dump): conversion method should be public. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15merge revision(s) 16654:shyouhei
* marshal.c (w_object, marshal_dump, r_object0, marshal_load): search private methods too. [ruby-dev:34671] * object.c (convert_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15merge revision(s) 16596:shyouhei
* marshal.c (r_object0, Init_marshal): Fix the garbled s_call definition; fixes [ruby-dev:34843]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15merge revision(s) 16569:shyouhei
* marshal.c (marshal_load): should initialize arg.data used for reentrant check. [ruby-dev:34837] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15merge revision(s) 16564:shyouhei
* marshal.c (reentrant_check): check reentrance via callcc. [ruby-dev:34802] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15merge revision(s) 15965:shyouhei
* marshal.c (w_object): add volatile to avoid potential GC bug. a patch from Tomoyuki Chikanaga <chikanag at nippon-control-system.co.jp> in [ruby-dev:34311]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-07merge revision(s) 13699:13704:shyouhei
* marshal.c (r_bytes0): refined length check. [ruby-dev:32059] * marshal.c (r_bytes0): check if source has enough data. [ruby-dev:32054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21 * marshal.c (w_extended): erroneous check condition when dumpshyouhei
method is defined. [ruby-core:10646] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-14* marshal.c (r_object0): fix a GC problem for reading a bignum onakr
IA64 with gcc 3.3.5 (Debian 1:3.3.5-13). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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-10-18* marshal.c (r_object0): check inheritance by the internal function.nobu
[ruby-dev:24515] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06* io.c (rb_io_s_sysopen): preserve path in the buffer allocated bymatz
ALLOCA_N() to prevent modification. [ruby-dev:24438] * io.c (rb_io_mode_flags): preserve append mode flag. [ruby-dev:24436] * io.c (rb_io_modenum_mode): do not use external output buffer. * string.c (rb_str_justify): differ pointer retrieval to prevent padding string modification. [ruby-dev:24434] * range.c (range_each_func): allow func to terminate loop by returning RANGE_EACH_BREAK. * range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959] * marshal.c (r_byte): retrieve pointer from string value for each time. [ruby-dev:24404] * marshal.c (r_bytes0): ditto. * enum.c (sort_by_i): re-entrance check added. [ruby-dev:24399] * io.c (io_read): should freeze all reading buffer. [ruby-dev:24400] * string.c (rb_str_sum): should use bignums when bits is greater than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395] * eval.c (specific_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24382] * eval.c (specific_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24382] * string.c (rb_str_sum): wrong cast caused wrong result. [ruby-dev:24385] * enum.c (enum_sort_by): hide temporary array from ObjectSpace.each_object. [ruby-dev:24386] * string.c (rb_str_sum): check was done with false pointer. [ruby-dev:24383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-02* string.c (rb_str_sum): check was done with false pointer.matz
[ruby-dev:24383] * string.c (rb_str_sum): string may be altered. [ruby-dev:24381] * eval.c (rb_f_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24373] * io.c (io_read): block string buffer modification during rb_io_fread() by freezing it temporarily. [ruby-dev:24366] * io.c (rb_io_s_popen): mode argument may be altered. [ruby-dev:24375] * file.c (rb_file_s_basename): ext argument may be altered. [ruby-dev:24377] * enum.c (enum_sort_by): use NODE instead of 2 element arrays. [ruby-dev:24378] * string.c (rb_str_chomp_bang): StringValue() may change the receiver. [ruby-dev:24371] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-27* marshal.c (w_class): should not dump singleton class.matz
[ruby-dev:22631] * marshal.c (class2path): check anonymous class/module before checking referable, and allow singleton classes. * marshal.c (class2path): get class path and check referable. [ruby-dev:22588] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-27RDoc comments added by Elliott Hughesdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22* configure.in (ac_cv_func_setitimer): moved from defines.hnobu
* defines.h, rubysig.h, signal.c: removed macro handling which should be done in configure. * configure.in (intrinsics.h): check if present. * ruby.h: include intrinsics.h if available. * bignum.c, marshal.c: include ieeefp.h if available. * missing.h (isinf): define as a macro if finite() and isnan() are available. [ruby-core:02032] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5244 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-10-20* gc.c (gc_sweep): loosen page free condition to avoid add_heap()matz
race condition. [ruby-dev:21633] * gc.c (gc_sweep): do not update malloc_limit when malloc_increase is smaller than malloc_limit. * ext/socket/socket.c (make_hostent): h_aliases may be NULL. (ruby-bugs PR#1195) * ext/socket/socket.c (sock_s_gethostbyaddr): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-15* marshal.c (w_object): dump extended modules as well.matz
* marshal.c (r_object0): TYPE_USRMARSHAL should restore extended modules before invoking marshal_load. these two fixes are done by Masatoshi Seki <m_seki@mva.biglobe.ne.jp>. * parse.y (yylex): argument parentheses preceded by spaces should be warned; not error. [ruby-talk:84103] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4774 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-10-06* marshal.c (w_object): wrong method name in the message.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06* marshal.c (w_object): should pass "weak" value to next level.matz
[ruby-dev:21496] * eval.c (proc_alloc): should not use cached object if klass is different. [ruby-talk:83685] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04* marshal.c (w_object): instance variable dump do not cause errormatz
for objects that cannot be dumped, if they traversed from marshal_dump. they are just ignored. * gc.c (Init_stack): cast "space" (doble value) into unsigned int. should run on PowerPC. * eval.c (rb_eval): should not execute else part if any exception is caught. [ruby-dev:21482] * parse.y (f_args): should allow unparenthesized block argument. * parse.y (f_rest_arg): should allow unparenthesized rest argument. * lib/irb/ruby-lex.rb (RubyLex::identify_identifier): support 'class ::Foo' syntax. [ruby-talk:83514] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02* time.c (time_load): restore instance variables (if any) beforematz
loading from marshaled data. * time.c (time_mdump): new marshal dumper. _dump is still available for compatibility. * time.c (time_mload): new marshal loader. * marshal.c (w_object): preserve instance variables for objects with marshal_dump. * marshal.c (r_object0): restore instance variables before calling marshal_load. * error.c (rb_warn_m): always return nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-16* marshal.c (w_symbol, w_object): get rid of warnings.nobu
* re.c (rb_memsearch): ditto. * time.c (time_dump): ditto. * ext/extmk.rb (extmake): not continue making when extconf.rb failed. * ext/openssl/extconf.rb: check __VA_ARGS__ macro more precisely. * ext/openssl/ossl.h: remove version.h dependency. * ext/openssl/ruby_missing.h: ditto. * lib/mkmf.rb (pkg_config): use --libs output except with only-L for other options. [ruby-list:38099] * lib/mkmf.rb (create_makefile): separate rule for static library from shared object. * win32/Makefile.sub, bcc32/Makefile.sub, wince/Makefile.sub: define exec_prefix and libdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-09* marshal.c (w_object): do not dump generic instance variable whenmatz
marshal_dump is defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-08* marshal.c (w_object): should set `c_arg' at first.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-06* eval.c (rb_call0): update ruby_class as well as ruby_cref.matz
(ruby-bugs-ja PR#540) * eval.c (rb_yield_0): remove ruby_frame->cbase and unify to ruby_cref. [ruby-talk:78141] * eval.c: initialize /* OK */ variables by Qnil to stop warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-04* eval.c (method_proc): should specify YIELD_FUNC_SVALUE.matz
[ruby-dev:21107] * marshal.c (w_object): should not call w_extended for USRMARSHAL dump. [ruby-dev:21106] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-31* numeric.c (rb_num_coerce_relop): export function.matz
* marshal.c (w_object): check has been dropped. "_dump must return string." [ruby-dev:21024] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30* marshal.c (w_object): marshal_dump should not take anymatz
argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29* marshal.c (w_object): if object responds to 'marshal_dump',matz
Marshal.dump uses it to dump object. unlike '_dump', marshal_dump returns any kind of object. * marshal.c (r_object0): restore instance by calling 'marshal_load' method. unlike '_load', it's an instance method, to handle cyclic reference. * marshal.c (marshal_load): all objects read from file should be tainted. [ruby-core:01325] * lib/timeout.rb (Timeout::timeout): execute immediately if sec is zero. * ext/socket/socket.c (socks_init): typo fixed. [ruby-talk:77232] * ext/socket/extconf.rb: the default value for --enable-socks is taken from ENV["SOCKS_SERVER"]. [ruby-talk:77232] * ruby.c (proc_options): add -W option. -W0 to shut up all warning messages. [ruby-talk:77227] * error.c (rb_warn): no message will be printed if the value of $VERBOSE is "nil", i.e. perfect silence. * ruby.c (verbose_setter): $VERBOSE value is either true, false, or nil. * io.c (Init_IO): no "read" check for $stdin. in addition some function names has been changed. * regex.c (re_match_exec): incorrect multibyte match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06* eval.c (ruby_cleanup): $SAFE is turned off in the finalization.matz
Each END proc should preserve its own $SAFE level. [ruby-core:01119] * marshal.c (marshal_load): remove unused variable "hash". [ruby-core:01120] * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] * array.c (rb_ary_first): optional argument to retrieve first n elements. * array.c (rb_ary_last): optional argument to retrieve last n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-30* io.c (rb_f_syscall): type dispatch should be based onmatz
rb_check_string_type(), not FIXNUM_P(), because values may be a bignum. [ruby-talk:72257] * eval.c (rb_call0): should pass the current klass value to block_invoke, which may be called via "super". [ruby-core:01077] * eval.c (block_invoke): now takes 4th argument "klass". * eval.c (block_alloc): should propagate BLOCK_PROC to ruby_block. * marshal.c (r_object0): should not use "yield" method, use "call" instead. (ruby-bugs-ja PR#476) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-22* gc.c (run_final): use rb_thread_critical instead of DEFER_INTS.matz
[ruby-dev:20272] * marshal.c: try to make ArgumentError and TypeError consistent. [ruby-core:01068] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-22* marshal.c (save_mantissa, load_mantissa): for interoperabilitynobu
should count cut-down bit from topmost. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-21* marshal.c: one more digit for decimal point. [ruby-talk:69808]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-20* marshal.c (w_float): append least mantissa bits to get ridnobu
of roundoff problem. [ruby-talk:69518] * marshal.c (r_object0): load least mantissa bits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-18* struct.c (rb_struct_eql): should compare values with "eql?".matz
* range.c (range_check): <=> returns nil for invalid values; should check. * regex.c (re_compile_pattern): should not set RE_OPTIMIZE_ANCHOR, if anychar_repeat is enclosed by parentheses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09* marshal.c (w_object): preserve extended module on struct.nobu
(ruby-bugs-ja:PR#422) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-08* eval.c (Init_Proc): make Method and UnboundMethod independent.matz
They are like instance and its class. [ruby-core:00941] * parse.y (yylex): disallow global variables like "$1ve". [ruby-core:00945] * marshal.c (marshal_dump): Marshal.dump(0, false) should cause an error. (ruby-bugs-ja PR#421) * regex.c (re_compile_pattern): warn if '-' is the edge of character range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-03* marshal.c (w_nbyte): should output always via rb_io_write().matz
* marshal.c (dump_ensure): ditto. * marshal.c (marshal_dump): should call "binmode" method, if it responds to. * marshal.c (r_byte): should input always via "getc" method. * marshal.c (r_bytes0): should input always via "read" method. * marshal.c (marshal_load): need not to set up FILE* fp; git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-31* variable.c (rb_obj_classname): new function.matz
* string.c (rb_str_dup): should preserve original's class (but not hidden singleton class). * string.c (rb_str_substr): ditto. * parse.y: backout EXPR_CMDARG removal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3427 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-15* configure.in (ARCHFILE): set even unless --enable-shared onnobu
AIX. [ruby-talk:61466] * marshal.c (math.h): should be included after ruby.h on AIX. [ruby-talk:61366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-06* st.h, st.c: Introduce new conventional typedef's, st_data_t,knu
st_compare_func_t, st_hash_func_t and st_each_func_t. * st.h, st.c: Do explicit function declarations and do not rely on implicit declarations. On such platforms as IA64, int argument values are NOT automatically promoted to long (64bit) values, so explicit declarations are mandatory for those functions that take long values or pointers. This fixes miniruby's coredump on FreeBSD/IA64. * class.c, eval.c, gc.c, hash.c, marshal.c, parse.y, variable.c: Add proper casts to avoid warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20* io.c (rb_io_fwrite): separated from io_write().nobu
* marshal.c (w_byten): use rb_io_fwrite() to support non-blocking IO, and added error check. * rubyio.h: prototypes; rb_io_fwrite git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19* numeric.c (num_step): use DBL_EPSILON.matz
* array.c (rb_check_array_type): new function: return an array (convert if possible), or nil. * string.c (rb_check_string_type): new function: return a string (convert if possible), or nil. * numeric.c (rb_dbl_cmp): returns nil if values are not comparable. * numeric.c (fix_cmp,flo_cmp): use rb_num_coerce_cmp() * bignum.c (rb_big_cmp): ditto. * numeric.c (rb_num_coerce_cmp): new coercing function for "<=>", which does not raise TypeError. * numeric.c (do_coerce): can be supress exception now. * object.c (rb_mod_cmp): should return nil for non class/module objects. * re.c (rb_reg_eqq): return false if the argument is not a string. now returns boolean value. * class.c (rb_include_module): argument should be T_MODULE, not T_class, nor T_ICLASS. * eval.c (is_defined): "defined?" should return "assignment" for attribute assignment (e.g. a.foo=b) and indexed assignment (e.g. a[2] = 44). * parse.y (aryset): use NODE_ATTRASGN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-12* marshal.c (r_object0): singleton class instance can't be loaded. ↵nobu
(ruby-bugs-ja:PR#366) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e