Skip to content

Commit

Permalink
Minor whitespace fixes and test fixups.
Browse files Browse the repository at this point in the history
  • Loading branch information
haberman committed Oct 19, 2021
1 parent 4c445b1 commit bb5a268
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/google/protobuf/compiler/ruby/ruby_generated_code_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions src/google/protobuf/compiler/ruby/ruby_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,13 @@ bool GenerateFile(const FileDescriptor* file, io::Printer* printer,
"\n",
"filename", file->name());

printer->Print(
"require 'google/protobuf'\n\n");
printer->Print("require 'google/protobuf'\n\n");

for (int i = 0; i < file->dependency_count(); i++) {
printer->Print("require '$name$'\n", "name", GetRequireName(file->dependency(i)->name()));
if (file->dependency_count() != 0) {
for (int i = 0; i < file->dependency_count(); i++) {
printer->Print("require '$name$'\n", "name", GetRequireName(file->dependency(i)->name()));
}
printer->Print("\n");
}

// TODO: Remove this when ruby supports extensions for proto2 syntax.
Expand Down

0 comments on commit bb5a268

Please sign in to comment.