mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fix class name validation in Struct.new
Before this patch:
$ bin/mruby -e 'p Struct.new("A-")'
#=> Struct::"A-"
After this patch:
$ bin/mruby -e 'p Struct.new("A-")'
#=> NameError: identifier A- needs to be constant
This commit is contained in:
@@ -88,6 +88,7 @@ MRB_API struct RClass* mrb_class_real(struct RClass* cl);
|
||||
mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv);
|
||||
|
||||
void mrb_class_name_class(mrb_state*, struct RClass*, struct RClass*, mrb_sym);
|
||||
mrb_bool mrb_const_name_p(mrb_state*, const char*, mrb_int);
|
||||
mrb_value mrb_class_find_path(mrb_state*, struct RClass*);
|
||||
void mrb_gc_mark_mt(mrb_state*, struct RClass*);
|
||||
size_t mrb_gc_mark_mt_size(mrb_state*, struct RClass*);
|
||||
|
||||
Reference in New Issue
Block a user