akr
9035b0e759
* marshal.c: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-19 10:15:57 +00:00
nobu
cea3919ae6
* configure.in (RUBY_CHECK_PRINTF_PREFIX): check for printf format
...
specifier if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 15:03:51 +00:00
nobu
d410639a6d
* compile.c (iseq_build_body), error.c (set_syserr, get_syserr),
...
(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
2010-10-12 14:47:23 +00:00
nobu
359d537878
* marshal.c (w_float): should not append a dot if no fractal part
...
exists. [ruby-dev:41936]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 09:25:39 +00:00
nobu
25b9eb5e57
* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]
...
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
2010-07-18 07:31:54 +00:00
nobu
12b0ccc204
* marshal.c (w_object): suppress empty instance variable entry on
...
compatible dump objects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-30 23:40:37 +00:00
nobu
fff5de3bd4
* marshal.c (w_object, r_bytes0, marshal_load): suppress warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-27 15:13:25 +00:00
nobu
23af1d2a4b
* marshal.c (struct dump_arg, struct load_arg): merge taint and
...
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
2010-06-23 20:44:44 +00:00
drbrain
dd8d4f0075
document marshal_dump and marshal_load
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-26 02:50:58 +00:00
nobu
e207a3912c
* marshal.c (w_float): use dtoa directly instead of stripping
...
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
2010-05-21 03:26:00 +00:00
marcandre
7729de4d91
* array.c: Documentation: change => in call-seq to ->.
...
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
2010-05-17 21:07:33 +00:00
nobu
4eb19660e9
* marshal.c (w_float): strip ".0" from end for rubyspec.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13 22:27:10 +00:00
nobu
cf32125cff
* marshal.c (w_float): use minimal representation.
...
* 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
2010-05-13 04:30:07 +00:00
matz
6f828a2437
* marshal.c (r_object0): should prepare placeholder before
...
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
2010-02-24 14:16:59 +00:00
nobu
05270882ae
* marshal.c (r_object0): removed duplicated entry for regexp.
...
[ruby-dev:40416]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-14 03:54:47 +00:00
nobu
27e492bec7
* marshal.c (r_object0): register regexp object before encoding
...
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
2010-02-13 19:45:35 +00:00
matz
c1ad9a5fd1
* marshal.c (id2encidx): duplicated entry for encoding name.
...
[ruby-dev:40388]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-13 06:03:06 +00:00
nobu
87fb6fbcc9
* marshal.c (r_object0): replace non-1.8 escapes directly.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-11 05:43:19 +00:00
nobu
50bf2e550a
* marshal.c (r_object0): read sequentially since marshal source
...
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
2010-02-11 05:37:43 +00:00
nobu
902b109465
* marshal.c (w_symbol): dump no encoding for 7bit only coderange
...
symbol. [ruby-core:27375]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-08 04:12:29 +00:00
naruse
7ed0640ffb
Add Float::INFINITY and Float::NAN.
...
* 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
2009-12-29 07:05:39 +00:00
nobu
1d10aa8bfc
* marshal.c (w_object): reverted r26007. [ruby-dev:39845]
...
* 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
2009-12-07 05:11:10 +00:00
nobu
1cc1ea378a
* marshal.c (w_object): dump instance variables when using
...
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
2009-12-05 06:35:07 +00:00
wanabe
12b637a65d
* marshal.c (mark_dump_arg): mark str. see also [ruby-dev:39735]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-25 22:27:44 +00:00
nobu
75090a663b
* marshal.c (marshal_dump): use normal object as the buffer so
...
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
2009-11-21 07:38:51 +00:00
nobu
914b36e3f9
* marshal.c (w_object, r_object0): use RHASH_IFNONE but not ifnone
...
directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-11 00:36:04 +00:00
naruse
88175d1779
Add rdoc about objects can't Marshal#dump. [ruby-core:23314]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-04 13:42:03 +00:00
akr
b9e0294eda
fix typos.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03 17:46:28 +00:00
nobu
f25fd72a0a
* marshal.c (w_symbol, r_symreal): fixed the order of symbol and
...
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
2009-10-20 08:57:33 +00:00
nobu
79a8955f8d
* marshal.c (id2encidx): register encoding name.
...
(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
2009-10-17 13:11:05 +00:00
nobu
bd2a1db5af
* marshal.c (r_object0): suppressed a warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-12 02:28:48 +00:00
naruse
8ab0220352
* marshal.c (has_encoding): added for check the regexp
...
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
2009-10-11 18:49:41 +00:00
nobu
95b3da63f1
* marshal.c (marshal_dump, marshal_load): prevent from GC.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10 15:14:40 +00:00
nobu
90ce6d2323
* marshal.c (mark_dump_arg, mark_load_arg): ignore already cleaned
...
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
2009-10-07 07:42:30 +00:00
nobu
f6f89b880a
* marshal.c (struct {dump,load}_arg): manage with dfree, instead
...
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
2009-10-04 10:30:56 +00:00
nobu
1aa21e630f
* marshal.c (r_object0): entry regexp object before its encoding
...
name. [ruby-core:25625]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 14:51:18 +00:00
nobu
a8cf451714
* marshal.c (must_not_be_anonymous): fixed silly miss.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-09 22:02:31 +00:00
nobu
3ece383660
* marshal.c (class2path, w_unique, w_extended, w_class, w_uclass):
...
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
2009-08-09 21:55:55 +00:00
nobu
ac2557e09f
* marshal.c (w_symbol r_symlink, r_symbol, r_object0): fix for
...
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
2009-08-07 21:18:33 +00:00
nobu
e07cb859cc
* suppressed shorten-64-to-32 warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18 08:05:32 +00:00
naruse
f03642038e
* marshal.c (r_object0): should return real object.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13 16:26:08 +00:00
nobu
4fbc270cd5
* marshal.c (r_object0): should not shadow outer variable not to
...
return Qnil always.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13 11:21:55 +00:00
naruse
ecb962058a
* marshal.c (r_object0): copy instance variables to new regexp.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13 10:43:45 +00:00
naruse
143d1d840d
* marshal.c (r_object0): set encoding only if the encoding is not US-ASCII.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10 05:51:17 +00:00
naruse
f69af8e877
Remove debug print.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-09 16:02:02 +00:00
naruse
e6989a7ec2
* marshal.c (r_object0): replace \u by u when the regexp is
...
made by Ruby 1.8. [ruby-dev:36750]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-09 14:47:22 +00:00
nobu
4bef732db1
* marshal.c (w_encoding): encodings need extra depth.
...
[ruby-core:24100]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-30 23:46:20 +00:00
nobu
d70719b061
* marshal.c (r_ivar): should not set internal encoding ivar as an
...
ordinary ivar. [ruby-dev:38596]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-13 00:58:30 +00:00
matz
7afe0c92ea
* marshal.c (w_encoding): more compact encoding information for
...
US-ASCII and UTF-8. [incompatible] [experimental]
* marshal.c (r_ivar): restore :E encoding information.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-27 16:31:51 +00:00
nobu
8e86bd59c0
* common.mk (bignum.o, numeric.o): depend on util.h.
...
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@23575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-26 04:58:15 +00:00