Skip to content

Commit 6efe052

Browse files
committed
Fix define_accessors to work with full qualified field names
Without this, specs won't even run.
1 parent 48e06f8 commit 6efe052

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/protobuf/field/base_field.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ def fully_qualified_name_only!
179179
def define_accessor(simple_field_name, fully_qualified_field_name)
180180
message_class.class_eval <<-ruby, __FILE__, __LINE__
181181
def #{simple_field_name}!
182-
@values[:#{fully_qualified_field_name}]
182+
@values[:"#{fully_qualified_field_name}"]
183183
end
184184
185185
def #{simple_field_name}
186-
self[:#{fully_qualified_field_name}]
186+
self[:"#{fully_qualified_field_name}"]
187187
end
188188
189189
def #{simple_field_name}=(value)
190-
self[:#{fully_qualified_field_name}] = value
190+
self[:"#{fully_qualified_field_name}"] = value
191191
end
192192
ruby
193193

0 commit comments

Comments
 (0)