Skip to content

Commit c96bb78

Browse files
committed
- -> _
Because hyphen are not common in Go's filename delimiters
1 parent 3b4cdfe commit c96bb78

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_tools/ruby_h_to_go/lib/ruby_h_to_go/generator_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module GeneratorHelper
77
# @param ruby_header_file [String]
88
# @return [String]
99
def go_file_name(header_dir:, ruby_header_file:)
10-
ruby_header_file.delete_prefix(header_dir + File::SEPARATOR).gsub(File::SEPARATOR, "-").gsub(/\.h$/, ".go")
10+
ruby_header_file.delete_prefix(header_dir + File::SEPARATOR).gsub(File::SEPARATOR, "_").gsub(/\.h$/, ".go")
1111
end
1212

1313
# @param str [String]

_tools/ruby_h_to_go/spec/ruby_h_to_go/generator_helper_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
let(:header_dir) { "/path/to/include" }
1010
let(:ruby_header_file) { "/path/to/include/ruby/internal/intern/thread.h" }
1111

12-
it { should eq "ruby-internal-intern-thread.go" }
12+
it { should eq "ruby_internal_intern_thread.go" }
1313
end
1414
end

0 commit comments

Comments
 (0)