diff --git a/src/google/protobuf/compiler/ruby/ruby_generated_code_pb.rb b/src/google/protobuf/compiler/ruby/ruby_generated_code_pb.rb index 0c9ed6fb9f..7e66d1ecc8 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generated_code_pb.rb +++ b/src/google/protobuf/compiler/ruby/ruby_generated_code_pb.rb @@ -68,9 +68,9 @@ end module A module B module C - TestMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass - TestMessage::NestedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass - TestEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule + TestMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass + TestMessage::NestedMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass + TestEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule end end end diff --git a/src/google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb b/src/google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb index 15b340ada0..c89738fe83 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb +++ b/src/google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb @@ -69,9 +69,9 @@ end module A module B module C - TestMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass - TestMessage::NestedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass - TestEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule + TestMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass + TestMessage::NestedMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass + TestEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule end end end diff --git a/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb b/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb index 74f3bf3d76..cdbbe891bc 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb +++ b/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb @@ -14,7 +14,7 @@ end module AA module BB module CC - Four = Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.and.Four").msgclass + Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.and.Four").msgclass end end end diff --git a/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb b/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb index 24ff21e174..e6d47011e8 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb +++ b/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb @@ -14,7 +14,7 @@ end module A module B module C - Four = Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass + Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass end end end diff --git a/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb b/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb index 3a1dd67d26..1ac0ef7ad0 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb +++ b/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb @@ -14,7 +14,7 @@ end module One module Two module AThree - Four = Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass + Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass end end end diff --git a/src/google/protobuf/compiler/ruby/ruby_generator.cc b/src/google/protobuf/compiler/ruby/ruby_generator.cc index 23091c8f4f..67b5538cd7 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generator.cc +++ b/src/google/protobuf/compiler/ruby/ruby_generator.cc @@ -371,7 +371,7 @@ void GenerateMessageAssignment(const std::string& prefix, "prefix", prefix, "name", RubifyConstant(message->name())); printer->Print( - "Google::Protobuf::DescriptorPool.generated_pool." + "::Google::Protobuf::DescriptorPool.generated_pool." "lookup(\"$full_name$\").msgclass\n", "full_name", message->full_name()); @@ -391,7 +391,7 @@ void GenerateEnumAssignment(const std::string& prefix, const EnumDescriptor* en, "prefix", prefix, "name", RubifyConstant(en->name())); printer->Print( - "Google::Protobuf::DescriptorPool.generated_pool." + "::Google::Protobuf::DescriptorPool.generated_pool." "lookup(\"$full_name$\").enummodule\n", "full_name", en->full_name()); }