Skip to content

Commit e06bc8f

Browse files
committed
Ruby: Use serialize to for the string representation of ConstantValue.
1 parent bddd22f commit e06bc8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private string getContentSpecific(Content c) {
143143
exists(string name | c = TFieldContent(name) and result = "Field[" + name + "]")
144144
or
145145
exists(ConstantValue cv |
146-
c = TKnownElementContent(cv) and result = "Element[" + cv.toString() + "!]"
146+
c = TKnownElementContent(cv) and result = "Element[" + cv.serialize() + "!]"
147147
)
148148
or
149149
c = TUnknownElementContent() and result = "Element[?]"
@@ -155,7 +155,8 @@ private string getContentSetSpecific(ContentSet cs) {
155155
cs = TAnyElementContent() and result = "Element[any]"
156156
or
157157
exists(Content::KnownElementContent kec |
158-
cs = TKnownOrUnknownElementContent(kec) and result = "Element[" + kec.getIndex() + "]"
158+
cs = TKnownOrUnknownElementContent(kec) and
159+
result = "Element[" + kec.getIndex().serialize() + "]"
159160
)
160161
or
161162
exists(int lower, boolean includeUnknown, string unknown |

0 commit comments

Comments
 (0)