From 7a10005c10eec21a6c1c8c605bf8bed196ca9c2f Mon Sep 17 00:00:00 2001 From: Tomasz Mazur Date: Tue, 27 Jan 2026 19:11:53 +0100 Subject: [PATCH 1/2] Initialize line_protocol with String.new Fixes #148 --- lib/influxdb2/client/point.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/influxdb2/client/point.rb b/lib/influxdb2/client/point.rb index 316631b..17fb0f2 100644 --- a/lib/influxdb2/client/point.rb +++ b/lib/influxdb2/client/point.rb @@ -114,7 +114,7 @@ def time(time, precision) # # @return a string representation of the point def to_line_protocol - line_protocol = '' + line_protocol = String.new measurement = _escape_key(@name || '', ESCAPE_MEASUREMENT_LIST) line_protocol << measurement From d310b58f37e4b05e216d22281128cbfd6838dc3e Mon Sep 17 00:00:00 2001 From: Tomasz Mazur Date: Thu, 29 Jan 2026 08:55:17 +0100 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7919f12..494f687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## 3.3.0 [unreleased] +1. [#149](https://github.com/influxdata/influxdb-client-ruby/pull/149): Fix FrozenError in Point#to_line_protocol when frozen string literals are enabled + ## 3.2.0 [2024-11-27] ### Others @@ -242,4 +244,3 @@ To overcome this limitation you have to set the client property `redirect_forwar ### Features 1. [#4](https://github.com/influxdata/influxdb-client-ruby/pull/4): Added WriteApi that will be used for Fluentd plugin -