Skip to content

Commit 1fad950

Browse files
lib/rb/lib/thrift/definition: Handle missing newly added symbol in the reflection
1 parent 8c3ba58 commit 1fad950

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/rb/lib/thrift/definition.rb

+4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ def initialize(klass)
1515
end
1616

1717
def structured_annotations
18+
return [] unless @klass.const_defined? :STRUCTURED_ANNOTATIONS
19+
1820
@klass::STRUCTURED_ANNOTATIONS
1921
end
2022

2123
def legacy_annotations
24+
return {} unless @klass.const_defined? :LEGACY_ANNOTATIONS
25+
2226
@klass::LEGACY_ANNOTATIONS
2327
end
2428

0 commit comments

Comments
 (0)