summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/marshal.c b/marshal.c
index a7b2efebc6..318292b125 100644
--- a/marshal.c
+++ b/marshal.c
@@ -213,6 +213,9 @@ w_unique(s, arg)
char *s;
struct dump_arg *arg;
{
+ if (s[0] == '#') {
+ rb_raise(rb_eArgError, "can't dump anonymous class %s", s);
+ }
w_symbol(rb_intern(s), arg);
}