summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index 5e0c30b54aa..b6de65023cb 100644
--- a/marshal.c
+++ b/marshal.c
@@ -576,7 +576,13 @@ w_obj_each(st_data_t key, st_data_t val, st_data_t a)
struct w_ivar_arg *ivarg = (struct w_ivar_arg *)a;
struct dump_call_arg *arg = ivarg->dump;
- if (to_be_skipped_id(id)) return ST_CONTINUE;
+ if (to_be_skipped_id(id)) {
+ if (id == s_encoding_short) {
+ rb_warn("instance variable `E' on class %"PRIsVALUE" is not dumped",
+ CLASS_OF(arg->obj));
+ }
+ return ST_CONTINUE;
+ }
if (!ivarg->num_ivar) {
rb_raise(rb_eRuntimeError, "instance variable added to %"PRIsVALUE" instance",
CLASS_OF(arg->obj));