File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,9 @@ def initialize(yaml)
4747 @ruby_full_name = yaml [ "name" ]
4848 @ruby_class_name = @ruby_full_name [ /[^:]+\z / ] # demodulize-like
4949 name = @ruby_full_name . gsub ( "::" , "_" )
50- name = name . gsub ( /(^)?(_)?([A-Z](?:[A-Z]*(?=[A-Z_])|[a-z0-9]*))/ ) { ( $1 || $2 || "_" ) + $3. downcase } # underscore-like
51- @c_function_name = if @ruby_full_name =~ /^RBS::Types/
52- name . gsub ( "_types_" , "_" )
53- else
54- name . gsub ( "_declarations_" , "_decl_" )
55- end
50+ @c_function_name = name . gsub ( /(^)?(_)?([A-Z](?:[A-Z]*(?=[A-Z_])|[a-z0-9]*))/ ) { ( $1 || $2 || "_" ) + $3. downcase } # underscore-like
51+ @c_function_name . gsub! ( /^rbs_types_/ , 'rbs_' )
52+ @c_function_name . gsub! ( /^rbs_ast_declarations_/ , 'rbs_ast_decl_' )
5653 @c_constant_name = @ruby_full_name . gsub ( "::" , "_" )
5754 @c_parent_constant_name = @ruby_full_name . split ( "::" ) [ 0 ..-2 ] . join ( "::" ) . gsub ( "::" , "_" )
5855
You can’t perform that action at this time.
0 commit comments