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
nobu
d1abc53721
* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12 09:16:15 +00:00
nobu
080525aa68
* marshal.c (div0), numeric.c (infinite_value): new functions to
...
get rid of VC divion by 0 warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12 09:09:15 +00:00
nobu
12d2c8ba41
stripped trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:23:33 +00:00
knu
df0f575e1d
Fix grammos regarding the verb "refer".
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 08:55:40 +00:00
nobu
1d54761948
* marshal.c (marshal_dump): fixed for check_dump_arg.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 10:11:51 +00:00
nobu
7558136984
* marshal.c (marshal_dump): initializes dump_arg before any funcall.
...
[ruby-dev:36648]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 09:57:38 +00:00
ko1
69029b90fe
* gc.c, include/ruby/ruby.h: rename rb_register_mark_object()
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 14:59:14 +00:00
matz
31b6ea65bb
* include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM.
...
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp>
in [ruby-dev:36102].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 18:24:21 +00:00
nobu
14cf8d09ca
* marshal.c (struct load_arg): data is now st_table.
...
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 02:47:38 +00:00
nobu
5f9c188d97
* include/ruby/ruby.h (rb_intern_const): tiny optimization.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16 00:20:31 +00:00
shugo
38c94fa149
* marshal.c (marshal_load): set arg.untrust properly.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 09:42:22 +00:00
shugo
f433d710d0
* object.c (rb_obj_untrusted): new method Object#untrusted?.
...
(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: svn+ssh://ci.ruby-lang.org/ruby/trunk@18568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 07:25:05 +00:00
nobu
3916eb783c
* marshal.c (dump_ensure), process.c (run_exec_dup2),
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@18341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-04 05:08:57 +00:00