aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * hash.c, marshal.c, object.c, variable.c: fix callback argument typesnobu2012-03-301-1/+5
| | | | | | | of iterators. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_symreal): default to ASCII-8BIT for non-ascii symbols,nobu2012-03-281-2/+1
| | | | | | | | otherwise it should be converted to US-ASCII in rb_intern_str() if possible. [ruby-core:43762][Bug #6209] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_symreal): no longer need volatile modifier, as usingnobu2012-03-281-1/+1
| | | | | | | rb_intern_str() not rb_intern(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * use RB_TYPE_P which is optimized for constant types, instead ofnobu2011-09-291-9/+9
| | | | | | comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): Fix exception message when _dump_data is notdrbrain2011-08-051-1/+1
| | | | | | | defined on a T_DATA object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: declare internal functions here.akr2011-06-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * node.h: declare NODE dependent internal functions here. * iseq.h: declare rb_iseq_t dependent internal functions here. * vm_core.h: declare rb_thread_t dependent internal functions here. * bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y, proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c, thread.c, time.c, transcode.c, variable.c, vm.c, tool/compile_prelude.rb: don't declare internal functions declared in above headers. include above headers if required. Note that rb_thread_mark() was declared as void rb_thread_mark(rb_thread_t *th) in cont.c but defined as void rb_thread_mark(void *ptr) in vm.c. Now it is declared as the later in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: add for internal use only.nobu2011-05-181-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cancel subversion backfire. sorrymatz2011-03-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc_set_params): allow GC parameter configuration bymatz2011-03-071-2/+2
| | | | | | | environment variables. based on a patch from funny-falcon at https://gist.github.com/856296, but honors safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c: fix camelCase to snake_case in documentation code examples.naruse2011-03-051-2/+2
| | | | | | | | | | | | | | | | patched by Andrew Grimm. fixes Bug #4469 * marshal.c: ditto. * proc.c: ditto. * sample/biorhythm.rb: ditto. * vm_eval.c: ditto. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typo of rdoc. [ruby-core:35016]naruse2011-02-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c: parenthesize macro arguments.akr2010-12-191-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (RUBY_CHECK_PRINTF_PREFIX): check for printf formatnobu2010-10-121-1/+1
| | | | | | specifier if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_build_body), error.c (set_syserr, get_syserr),nobu2010-10-121-2/+2
| | | | | | | | | | | | | | (syserr_initialize), gc.c (define_final, rb_gc_copy_finalizer), (run_final), hash.c (rb_hash_aref, rb_hash_lookup2), (rb_hash_fetch_m, rb_hash_clear, rb_hash_aset, eql_i), iseq.c (iseq_load, iseq_data_to_ary), marshal.c (r_symlink), thread.c (rb_thread_local_aref), variable.c (generic_ivar_remove, ivar_get, rb_const_get_0), (rb_cvar_get), vm.c (rb_vm_check_redefinition_opt_method), vm_insnhelper.c (vm_get_ev_const), vm_method.c (remove_method), ext/iconv/iconv.c (map_charset): use st_data_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_float): should not append a dot if no fractal partnobu2010-08-051-2/+2
| | | | | | | exists. [ruby-dev:41936] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]nobu2010-07-181-2/+2
| | | | | | | | add parent member. * error.c (rb_typeddata_inherited_p): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): suppress empty instance variable entry onnobu2010-06-301-3/+7
| | | | | | | compatible dump objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object, r_bytes0, marshal_load): suppress warnings.nobu2010-06-271-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (struct dump_arg, struct load_arg): merge taint andnobu2010-06-231-32/+17
| | | | | | | | | | | | untrust flags into infection as bit flags. * marshal.c (w_nbyte, clear_dump_arg): infect the buffer as soon as appending, because it might have been finalized already at exit. based on a patch by Tomoyuki Chikanaga at [ruby-dev:41672]. [Bug #3463] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* document marshal_dump and marshal_loaddrbrain2010-05-261-9/+74
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_float): use dtoa directly instead of strippingnobu2010-05-211-4/+32
| | | | | | | | needless trailing .0. * numeric.c (flo_to_s): reverted. [ruby-dev:41341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Documentation: change => in call-seq to ->.marcandre2010-05-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_float): strip ".0" from end for rubyspec.nobu2010-05-131-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_float): use minimal representation.nobu2010-05-131-43/+9
| | | | | | | * numeric.c (ruby_dbl2cstr): split from rb_float_new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): should prepare placeholder beforematz2010-02-241-5/+5
| | | | | | | | processing instance variables. [ruby-dev:40414] * marshal.c (id2encidx): no longer need arg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): removed duplicated entry for regexp.nobu2010-02-141-1/+1
| | | | | | | [ruby-dev:40416] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): register regexp object before encodingnobu2010-02-131-1/+2
| | | | | | | | | name. [ruby-dev:40414] * re.c (rb_reg_alloc, rb_reg_init_str): split from rb_reg_new_str. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (id2encidx): duplicated entry for encoding name.matz2010-02-131-1/+0
| | | | | | [ruby-dev:40388] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): replace non-1.8 escapes directly.nobu2010-02-111-7/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): read sequentially since marshal sourcenobu2010-02-111-34/+11
| | | | | | | may not be possible to rewind. [ruby-dev:40386] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_symbol): dump no encoding for 7bit only coderangenobu2010-01-081-2/+3
| | | | | | | symbol. [ruby-core:27375] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add Float::INFINITY and Float::NAN.naruse2009-12-291-5/+3
| | | | | | | | | | | | | | | | | | | | * numeric.c (Init_Numeric): Add Float::INFINITY and Float::NAN. [ruby-dev:1657] [ruby-dev:4760] [ruby-list:7023] [ruby-list:46690] [ruby-core:26632] [ruby-talk:41352] [ruby-talk:203333] * include/ruby/defines.h (INFINITY): defined. * include/ruby/defines.h (NAN): defined. * include/ruby/util.h (ruby_div0): removed. * numeric.c (fix_pow): use INFINITY and NAN instead of ruby_div0(1.0). * marshal.c (r_object0): ditto. * bignum.c (big_fdiv): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): reverted r26007. [ruby-dev:39845]nobu2009-12-071-10/+1
| | | | | | | * test/test_delegate.rb (test_marshal): moved from test_marshal.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): dump instance variables when usingnobu2009-12-051-1/+10
| | | | | | | | | marshal_dump. [ruby-core:24211] * variable.c (rb_ivar_count): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (mark_dump_arg): mark str. see also [ruby-dev:39735]wanabe2009-11-251-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (marshal_dump): use normal object as the buffer sonobu2009-11-211-2/+1
| | | | | | | that no hidden object is exposed to ruby-level. [ruby-dev:39744] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object, r_object0): use RHASH_IFNONE but not ifnonenobu2009-11-111-4/+4
| | | | | | | directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add rdoc about objects can't Marshal#dump. [ruby-core:23314]naruse2009-11-041-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2009-11-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_symbol, r_symreal): fixed the order of symbol andnobu2009-10-201-2/+4
| | | | | | | | its encoding modifier, in order to make the dump readable from 1.8. [ruby-dev:39515] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (id2encidx): register encoding name.nobu2009-10-171-18/+29
| | | | | | | | (r_object0): register object before encoding name. [ruby-core:24882] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): suppressed a warning.nobu2009-10-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (has_encoding): added for check the regexpnaruse2009-10-111-14/+39
| | | | | | | | is dumped by 1.8 or 1.9. * marshal.c (r_object0): use has_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (marshal_dump, marshal_load): prevent from GC.nobu2009-10-101-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (mark_dump_arg, mark_load_arg): ignore already cleanednobu2009-10-071-2/+6
| | | | | | | | | data. [ruby-core:25969] * marshal.c (clear_dump_arg, clear_load_arg): clear freed fields. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (struct {dump,load}_arg): manage with dfree, insteadnobu2009-10-041-76/+100
| | | | | | | | of using local variable which may be moved by context switch. [ruby-dev:39425] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): entry regexp object before its encodingnobu2009-09-181-4/+6
| | | | | | | name. [ruby-core:25625] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (must_not_be_anonymous): fixed silly miss.nobu2009-08-091-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@24443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e