Skip to content

Commit 8da41bc

Browse files
shivansh-bhatnagar18dhower-qc
authored andcommitted
fix: printing object string in profile extension appendix (#941)
### **The Problem** Using `to_s` on a `T::Enum` like `kind` returns the object reference (e.g., `#<DatabaseObject::Kind::Profile>`) instead of the actual string value. ### **The Solution** Replaced `to_s` with `serialize`, which correctly returns the string value (e.g., `"profile"`). ### **Why** `serialize` is the intended way to extract string values from `T::Enum`. Fixes #853
1 parent cb43d32 commit 8da41bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/ruby-gems/udb/lib/udb/obj/database_obj.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Kind < T::Enum
4949
attr_reader :long_name
5050

5151
sig { returns(String) }
52-
def kind = @kind.to_s
52+
def kind = @kind.serialize
5353

5454
# @return [Architecture] If only a specification (no config) is known
5555
# @return [ConfiguredArchitecture] If a specification and config is known

0 commit comments

Comments
 (0)