summaryrefslogtreecommitdiffstats
path: root/marshal.c
Commit message (Collapse)AuthorAgeFilesLines
* * marshal.c (must_not_be_anonymous): fixed silly miss.nobu2009-08-091-3/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (class2path, w_unique, w_extended, w_class, w_uclass):nobu2009-08-091-33/+39
| | | | | | | | | | | | | deal with non-ascii class path. [ruby-core:24790] * marshal.c (r_unique, path2class, path2module, obj_alloc_by_path), (r_object0): ditto. * variable.c (rb_path_to_class): new encoding-aware function to get a class from its name. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_symbol r_symlink, r_symbol, r_object0): fix fornobu2009-08-071-17/+66
| | | | | | | | non-ascii symbols. loading such symbols can cause segfaults in older versions. [ruby-core:24788] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppressed shorten-64-to-32 warnings.nobu2009-07-181-18/+18
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): should return real object.naruse2009-07-131-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): should not shadow outer variable not tonobu2009-07-131-1/+1
| | | | | | | return Qnil always. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): copy instance variables to new regexp.naruse2009-07-131-2/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): set encoding only if the encoding is not US-ASCII.naruse2009-07-101-1/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove debug print.naruse2009-07-091-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): replace \u by u when the regexp isnaruse2009-07-091-1/+12
| | | | | | made by Ruby 1.8. [ruby-dev:36750] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_encoding): encodings need extra depth.nobu2009-06-301-3/+3
| | | | | | | [ruby-core:24100] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_ivar): should not set internal encoding ivar as annobu2009-06-131-3/+3
| | | | | | | ordinary ivar. [ruby-dev:38596] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_encoding): more compact encoding information formatz2009-05-271-0/+19
| | | | | | | | US-ASCII and UTF-8. [incompatible] [experimental] * marshal.c (r_ivar): restore :E encoding information. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (bignum.o, numeric.o): depend on util.h.nobu2009-05-261-21/+10
| | | | | | | | | | | * bignum.c, marshal.c: fixed types. * numeric.c (infinite_value): use ruby_div0. * include/ruby/util.h (ruby_div0): moved from marshal.c. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu2009-03-121-5/+5
| | | | | | | | | | numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (div0), numeric.c (infinite_value): new functions tonobu2009-03-121-4/+18
| | | | | | | get rid of VC divion by 0 warnings. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stripped trailing spaces.nobu2009-02-221-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix grammos regarding the verb "refer".knu2009-02-101-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (marshal_dump): fixed for check_dump_arg.nobu2008-10-011-19/+22
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (marshal_dump): initializes dump_arg before any funcall.nobu2008-10-011-10/+12
| | | | | | | [ruby-dev:36648] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c, include/ruby/ruby.h: rename rb_register_mark_object()ko12008-09-151-1/+1
| | | | | | | | | | | | | | to rb_gc_register_mark_object(). * eval.c, vm.c: initialize vm->mark_object_ary at Init_top_self(). * bignum.c, complex.c, encoding.c, ext/win32ole/win32ole.c, io.c, load.c, marshal.c, rational.c, ruby.c, vm.c: use rb_gc_register_mark_object() instead of rb_global_variable() or rb_gc_register_address(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM.matz2008-09-051-1/+1
| | | | | | | a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36102]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (struct load_arg): data is now st_table.nobu2008-09-021-17/+27
| | | | | | | | | | | * marshal.c (mark_load_arg): marks data and compat_tbl. * marshal.c (r_object0): no need to check if reentered. * marshal.c (marshal_load): make the wrapper with mark_load_arg. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_intern_const): tiny optimization.nobu2008-08-161-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (marshal_load): set arg.untrust properly.shugo2008-08-131-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_obj_untrusted): new method Object#untrusted?.shugo2008-08-131-0/+14
| | | | | | | | | | | | | | | (rb_obj_untrust): new method Object#untrust. (rb_obj_trust): new method Object#trust. * array.c, debug.c, time.c, include/ruby/ruby.h, re.c, variable.c, string.c, io.c, dir.c, vm_method.c, struct.c, class.c, hash.c, ruby.c, marshal.c: fixes for Object#untrusted?. * test/ruby/test_module.rb, test/ruby/test_array.rb, test/ruby/test_object.rb, test/ruby/test_string.rb, test/ruby/test_marshal.rb, test/ruby/test_hash.rb: added tests for Object#untrusted?. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (dump_ensure), process.c (run_exec_dup2),nobu2008-08-041-0/+1
| | | | | | | | | string.c (rb_str_replace), transcode.c (transcode_dispatch): fixed memory leaks. based on patches from shinichiro.h <shinichiro.hamaji AT gmail.com> at [ruby-dev:35751]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (sizeof ptrdiff_t): check for size of ptrdiff_t.nobu2008-07-121-2/+2
| | | | | | | | | | | | | * include/ruby/ruby.h (PRI?PTRDIFF, PRI?SIZE): printf conversion specifiers for ptrdiff_t and size_t/ssize_t. * insns.def (leave), marshal.c (long_toobig), transcode.c (str_transcode), vm_dump.c (control_frame_dump, stack_dump_each), (debug_print_register, debug_print_pre): t and z length modifiers are C99. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (struct RRegexp): new field usecnt. replaceakr2008-06-281-4/+7
| | | | | | | | | | | | | | | | | | | | | str and len by src. * gc.c (gc_mark_children): mark src field of regexp. (obj_free): don't free str field. * re.c (REG_BUSY): removed. (rb_reg_initialize): prohibit re-initialize regexp. (rb_reg_search): use usecnt to prevent freeing regexp currently using. this prevents SEGV by: r = /\A((a.)*(a.)*)*b/ r =~ "ab" + "\xc2\xa1".force_encoding("euc-jp") t = Thread.new { r =~ "ab"*8 + "\xc2\xa1".force_encoding("utf-8")} sleep 0.2 r =~ "ab"*8 + "\xc2\xa1".force_encoding("euc-jp") git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object, marshal_dump, r_object0, marshal_load): searchnobu2008-06-181-11/+11
| | | | | | | | | | | | public methods only. [ruby-core:17283] * object.c (convert_type): ditto. * lib/singleton.rb (Singleton#_dump): conversion method should be public. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu2008-06-091-0/+2
| | | | | | | * *.c: no cache in init functions. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): add a check for modification of array duringmame2008-06-021-5/+6
| | | | | | | its dump. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rational.c (string_to_r_internal): use rb_isdigit.naruse2008-06-011-1/+1
| | | | | | | | * marshal.c (long_toobig): use %zd. * ruby.c (set_arg0): move unused variable definition. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppress warnings with -Wwrite-string.nobu2008-05-311-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object, marshal_dump, r_object0, marshal_load): searchnobu2008-05-281-13/+14
| | | | | | | | | private methods too. [ruby-dev:34671] * object.c (convert_type): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (check_dump_arg, check_load_arg): check if reentered.nobu2008-05-221-0/+31
| | | | | | | [ruby-dev:34802] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): add volatile to avoid potential GC bug. amatz2008-04-101-1/+1
| | | | | | | patch from Tomoyuki Chikanaga <chikanag at nippon-control-system.co.jp> in [ruby-dev:34311]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): TYPE_USERDEF assigns id for ivars first.akr2008-04-101-15/+18
| | | | | | | [ruby-dev:34159] by nagachika. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix doc.akr2008-03-091-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (ROBJECT_NUMIV): renamed from ROBJECT_LEN.akr2008-02-251-2/+2
| | | | | | | | | | | | | | | | (ROBJECT_IVPTR): renamed from ROBJECT_PTR. * variable.c: follow the above renaming. * object.c: ditto. * gc.c: ditto. * marshal.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): no need to call r_entry for immediate values.usa2008-01-311-5/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): call r_entry/r_leave to call proc when TYPE_FIXNUM,naruse2008-01-311-0/+10
| | | | | | | TYPE_NIL, TYPE_TRUE, TYPE_FALSE, TYPE_SYMBOL. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): dump string encoding in USERDEF.akr2008-01-261-1/+1
| | | | | | | [ruby-dev:33401] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_byte): use getbyte instead of getc.akr2008-01-251-4/+4
| | | | | | | | (marshal_load): ditto. [ruby-dev:33264] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_internal_get_index): extracted fromakr2008-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | rb_enc_get_index. (rb_enc_internal_set_index): extracted from rb_enc_associate_index * include/ruby/encoding.h (ENCODING_SET): work over ENCODING_INLINE_MAX. (ENCODING_GET): ditto. (ENCODING_IS_ASCII8BIT): defined. (ENCODING_CODERANGE_SET): defined. * re.c (rb_reg_fixed_encoding_p): use ENCODING_IS_ASCII8BIT. * string.c (rb_enc_str_buf_cat): use ENCODING_IS_ASCII8BIT. * parse.y (reg_fragment_setenc_gen): use ENCODING_IS_ASCII8BIT. * marshal.c (has_ivars): use ENCODING_IS_ASCII8BIT. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * $Date$ keyword removed to avoid inclusion of locale dependentakr2008-01-061-1/+0
| | | | | | | string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h, re.c (rb_reg_new): keep interface same asnobu2008-01-041-1/+1
| | | | | | | | | | | | | | | | 1.8. [ruby-core:14583] * include/ruby/intern.h, re.c (rb_reg_new_str): renamed, and defines HAVE_RB_REG_NEW_STR macro to tell if it is available. * include/ruby/encoding.h (rb_enc_reg_new): added. * insns.def (toregexp), marshal.c (r_object0): use rb_reg_new_str(). * re.c (rb_reg_regcomp, rb_reg_s_union): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insnhelper.ci (vm_search_normal_superclass): rename function.matz2007-11-221-2/+2
| | | | | | | | * insnhelper.ci (vm_search_superclass): ditto. * proc.c (struct METHOD): rename rklass -> rclass. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check struct timespec, clock_gettime, utimensat,akr2007-11-191-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct stat.st_atim, struct stat.st_atimespec, struct stat.st_atimensec, struct stat.st_mtim, struct stat.st_mtimespec, struct stat.st_mtimensec, struct stat.st_ctim, struct stat.st_ctimespec, struct stat.st_ctimensec. * include/ruby/missing.h: provide struct timespec if not available. * time.c: support nanosecond-resolution using struct timespec. * include/ruby/intern.h: provide rb_time_nano_new. * file.c (utime_internal): use utimensat if available. (rb_file_s_utime): refactored. (rb_f_test): use stat_atime, stat_mtime, stat_ctime. (rb_stat_cmp): check tv_nsec. (stat_atimespec): new function. (stat_atime): ditto. (stat_mtimespec): ditto. (stat_mtime): ditto. (stat_ctimespec): ditto. (stat_ctime): ditto. (rb_stat_atime): use stat_atime. (rb_file_s_atime): ditto. (rb_file_atime): ditto. (rb_stat_mtime): use stat_mtime. (rb_file_s_mtime): ditto. (rb_file_mtime): ditto. (rb_file_ctime): use stat_ctime. (rb_file_s_ctime): ditto. (rb_stat_ctime): ditto. * variable.c (rb_copy_generic_ivar): clear clone's instance variables if obj has no instance variable. * marshal.c (w_object): dump instance variables of generated string for TYPE_USERDEF, even if original object has instance variables. * lib/time.rb (Time#xmlschema): use nsec instead of usec. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (mark_dump_arg): it may be called after dump_ensure.akr2007-11-181-0/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e