summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2019-06-13 21:24:48 +0900
committerKOBAYASHI Shuji <[email protected]>2019-06-13 21:24:48 +0900
commit9bd692bc67ee302bcbc359d0841458339c440fb4 (patch)
treeb3acb175c0b27b4af256949bdbb0b2031a00dd23 /include
parent1a98b94100a6331753bae17e158d053b129ad1d3 (diff)
downloadmruby-9bd692bc67ee302bcbc359d0841458339c440fb4.tar.gz
mruby-9bd692bc67ee302bcbc359d0841458339c440fb4.zip
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
Diffstat (limited to 'include')
-rw-r--r--include/mruby/class.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mruby/class.h b/include/mruby/class.h
index a68724538..c79a487b5 100644
--- a/include/mruby/class.h
+++ b/include/mruby/class.h
@@ -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*);