summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-02 04:25:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-02 04:25:53 +0000
commit3ab5d775b737f681225864200c893b68b7b8f546 (patch)
treea7d8d79fba4dd4bf11bcd80d66ab41679049fec3 /marshal.c
parente431908527e19099572492a08742c9529f3d32ab (diff)
* ext/socket/socket.c (unix_addr): getsockname(2) may result len = 0.
* ext/socket/socket.c (unix_peeraddr): getpeername(2) may result len = 0. * eval.c (POP_BLOCK): rb_gc_force_recycle() was called too much. Should not be called if SCOPE_DONT_RECYCLE is set. * string.c (rb_str_substr): should return an instance of receiver's class. * string.c (rb_str_succ): ditto. * array.c (rb_ary_subseq): ditto. * string.c (rb_str_reverse): should return an instance of reciever's class. * string.c (rb_str_times): ditto. * array.c (rb_ary_times): ditto * string.c (str_gsub): ditto. * string.c (rb_str_ljust): ditto. * string.c (rb_str_rjust): ditto. * string.c (rb_str_center): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/marshal.c b/marshal.c
index af62919f41..8f1e439bdc 100644
--- a/marshal.c
+++ b/marshal.c
@@ -344,6 +344,10 @@ w_object(obj, arg, limit)
w_byte(TYPE_CLASS, arg);
{
VALUE path = rb_class_path(obj);
+ if (RSTRING(path)->ptr[0] == '#') {
+ rb_raise(rb_eArgError, "can't dump anonymous class %s",
+ RSTRING(path)->ptr);
+ }
w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
}
break;
@@ -353,10 +357,6 @@ w_object(obj, arg, limit)
{
VALUE path = rb_class_path(obj);
if (RSTRING(path)->ptr[0] == '#') {
- rb_raise(rb_eArgError, "can't dump anonymous class %s",
- RSTRING(path)->ptr);
- }
- if (RSTRING(path)->ptr[0] == '#') {
rb_raise(rb_eArgError, "can't dump anonymous module %s",
RSTRING(path)->ptr);
}