mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Raise NameError for symbol struct access.
This commit is contained in:
@@ -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 */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user