aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.c
Commit message (Collapse)AuthorAgeFilesLines
* * parse.y (newline_node): do not use NODE_NEWLINE node anymore,matz2004-01-211-1/+1
| | | | | | | | | | | | | | | | use NEWLINE flag instead. * ext/socket/socket.c (sock_gethostbyname): returns host if ai_canonname is NULL. (ruby-bugs PR#1243) * parse.y (block_append): update nd_end for "real" head node. [ruby-list:39058] * marshal.c (w_class): should not dump singleton class. [ruby-dev:22631] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (class2path): check anonymous class/module beforenobu2004-01-171-10/+7
| | | | | | | checking referable, and allow singleton classes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (class2path): fix typo.nobu2004-01-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (class2path): get class path and check referable.nobu2004-01-161-4/+17
| | | | | | | [ruby-dev:22588] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* RDoc comments added by Elliott Hughesdave2003-12-271-0/+70
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (ac_cv_func_setitimer): moved from defines.hnobu2003-12-221-0/+3
| | | | | | | | | | | | | | | | | * 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
* * gc.c (Init_stack): stack region is far smaller than usual ifmatz2003-11-221-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * gc.c (gc_sweep): loosen page free condition to avoid add_heap()matz2003-10-201-13/+13
| | | | | | | | | | | | | | | 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
* * marshal.c (w_object): dump extended modules as well.matz2003-10-151-9/+21
| | | | | | | | | | | | * 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
* * marshal.c (r_object0): remove unnecessary iv restoration formatz2003-10-091-33/+19
| | | | | | | | | | | | | | | | | | 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
* * pack.c (uv_to_utf8): change message to "out of range", sincematz2003-10-091-1/+3
| | | | | | | | | | 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
* * marshal.c (w_object): wrong method name in the message.nobu2003-10-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): should pass "weak" value to next level.matz2003-10-061-1/+1
| | | | | | | | | | [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
* * marshal.c (w_object): instance variable dump do not cause errormatz2003-10-041-23/+32
| | | | | | | | | | | | | | | | | | | | | | 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
* * time.c (time_load): restore instance variables (if any) beforematz2003-10-021-26/+47
| | | | | | | | | | | | | | | | | | | | 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
* * marshal.c (w_symbol, w_object): get rid of warnings.nobu2003-08-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * marshal.c (w_object): do not dump generic instance variable whenmatz2003-08-091-2/+2
| | | | | | | marshal_dump is defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): should set `c_arg' at first.matz2003-08-081-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): update ruby_class as well as ruby_cref.matz2003-08-061-22/+21
| | | | | | | | | | | | (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
* * eval.c (method_proc): should specify YIELD_FUNC_SVALUE.matz2003-08-041-1/+2
| | | | | | | | | | [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
* * numeric.c (rb_num_coerce_relop): export function.matz2003-07-311-0/+3
| | | | | | | | * 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
* * marshal.c (w_object): marshal_dump should not take anymatz2003-07-301-1/+1
| | | | | | | argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): if object responds to 'marshal_dump',matz2003-07-291-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * eval.c (ruby_cleanup): $SAFE is turned off in the finalization.matz2003-06-061-2/+1
| | | | | | | | | | | | | | | | | | 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
* * io.c (rb_f_syscall): type dispatch should be based onmatz2003-05-301-1/+1
| | | | | | | | | | | | | | | | | | | 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
* * gc.c (run_final): use rb_thread_critical instead of DEFER_INTS.matz2003-05-221-7/+7
| | | | | | | | | | [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
* * marshal.c (save_mantissa, load_mantissa): for interoperabilitynobu2003-04-221-17/+60
| | | | | | | should count cut-down bit from topmost. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c: one more digit for decimal point. [ruby-talk:69808]nobu2003-04-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_float): append least mantissa bits to get ridnobu2003-04-201-6/+62
| | | | | | | | | 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
* * struct.c (rb_struct_eql): should compare values with "eql?".matz2003-04-181-4/+4
| | | | | | | | | | | * 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
* * marshal.c (w_object): preserve extended module on struct.nobu2003-04-091-17/+15
| | | | | | | (ruby-bugs-ja:PR#422) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_Proc): make Method and UnboundMethod independent.matz2003-04-081-2/+5
| | | | | | | | | | | | | | | | 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
* * marshal.c (w_nbyte): should output always via rb_io_write().matz2003-03-031-58/+26
| | | | | | | | | | | | | | | | * 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
* * variable.c (rb_obj_classname): new function.matz2003-01-311-4/+4
| | | | | | | | | | | | * 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
* Updated Copyrights of Matz to 2003.michal2003-01-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (ARCHFILE): set even unless --enable-shared onnobu2003-01-151-2/+2
| | | | | | | | | | 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
* * st.h, st.c: Introduce new conventional typedef's, st_data_t,knu2003-01-061-2/+2
| | | | | | | | | | | | | | | | | 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
* * io.c (rb_io_fwrite): separated from io_write().nobu2002-12-201-1/+2
| | | | | | | | | | * 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
* * numeric.c (num_step): use DBL_EPSILON.matz2002-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * marshal.c (r_object0): singleton class instance can't be loaded. ↵nobu2002-12-121-0/+3
| | | | | | (ruby-bugs-ja:PR#366) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_byten): added; write n bytes from s to arg.nobu2002-10-171-30/+75
| | | | | | | | | | * marshal.c (dump): flush buffered data. * marshal.c (marshal_dump, r_byte, r_bytes0, marshal_load): unify marshaling I/O. [ruby-talk:53368] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (glob_helper): must not closedir() when exception raisednobu2002-09-251-1/+0
| | | | | | | | | | | | | | while globbing "**". * marshal.c (w_uclass): unused variable. * re.c (match_clone): unused. * regex.c (re_compile_pattern): get rid of implicit promotion from plain char to int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_nesting): load wrapping module should appear inmatz2002-09-171-7/+7
| | | | | | | | | Module#nesting list. (ruby-bugs-ja:PR#328) * eval.c (rb_thread_remove): free stack buffer on remove. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (ruby_xmalloc): remove MALLOC_LIMIT to avoid frequentmatz2002-09-061-1/+1
| | | | | | | garabage collection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_path2class): should not use rb_eval_string().matz2002-09-051-40/+78
| | | | | | | | | | * marshal.c (w_extended): should allow marshaling of object which is extended by named module. * class.c (rb_make_metaclass): super may be T_ICLASS, need to skip. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_make_metaclass): obj.meta.super.meta should be equalmatz2002-09-041-48/+27
| | | | | | | | | | | | to obj.meta.meta.super (ruby-bugs-ja:PR#324). * parse.y (yylex): the warning message "invalid character syntax" was never issued. * marshal.c (r_bytes): do not use alloca (ruby-bugs:PR#382). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_become): should not free ptr if it's shared.matz2002-08-291-8/+17
| | | | | | | | | | | * eval.c (rb_alias): prohibit making an alias named "allocate" if klass is a metaclass. * string.c (rb_string_value_ptr): StringValuePtr() should never return NULL pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object): yield loaded objects, not intermediates.nobu2002-08-281-8/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_find_file): $LOAD_PATH must not be empty.matz2002-08-271-31/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * file.c (rb_find_file_ext): ditto. * range.c (range_eq): class check should be based on range.class, instead of Range to work with Range.dup. * range.c (range_eql): ditto. * class.c (rb_mod_dup): need to preserve metaclass and flags. * object.c (rb_cstr_to_dbl): had a buffer overrun. * marshal.c (w_class): integrate singleton check into a funciton to follow DRY principle. * marshal.c (w_uclass): should check singleton method. * object.c (rb_obj_dup): dmark and dfree functions must be match for T_DATA type. * object.c (rb_obj_dup): class of the duped object must be match to the class of the original. * re.c (rb_reg_quote): do not escape \t, \f, \r, \n, for they are not regular expression metacharacters. * time.c (time_s_alloc): use time_free instead of free (null check, also serves for type mark). * time.c (time_s_at): check dfree function too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *.c: Int vs Long cleanupmichal2002-08-211-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e