Raise NameError for symbol struct access.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-02-06 22:00:27 +09:00
parent 215906dc83
commit 6397ec727f
+1 -1
View File
@@ -399,7 +399,7 @@ struct_aref_sym(mrb_state *mrb, mrb_value obj, mrb_sym id)
return ptr[i];
}
}
mrb_raisef(mrb, E_INDEX_ERROR, "'%S' is not a struct member", mrb_sym2str(mrb, id));
mrb_name_error(mrb, id, "no member '%S' in struct", mrb_sym2str(mrb, id));
return mrb_nil_value(); /* not reached */
}