diff --git a/lib/groonga/context.rb b/lib/groonga/context.rb index af2a2787..11624e8f 100644 --- a/lib/groonga/context.rb +++ b/lib/groonga/context.rb @@ -1,6 +1,4 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2010-2016 Kouhei Sutou +# Copyright (C) 2010-2025 Sutou Kouhei # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -232,7 +230,7 @@ def execute_command(name, parameters={}) # @yieldparam response [String] A response for a command. # @return [void] def restore(dumped_commands) - buffer = "" + buffer = +"" continued = false dumped_commands.each_line do |line| line = line.chomp diff --git a/lib/groonga/dumper.rb b/lib/groonga/dumper.rb index 72d395ea..0de758be 100644 --- a/lib/groonga/dumper.rb +++ b/lib/groonga/dumper.rb @@ -1,6 +1,4 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2011-2016 Kouhei Sutou +# Copyright (C) 2011-2025 Sutou Kouhei # Copyright (C) 2014 Masafumi Yokoyama # # This library is free software; you can redistribute it and/or @@ -26,7 +24,7 @@ def default_output end def utf8_string - "" + +"" end end @@ -759,7 +757,7 @@ def resolve_value(record, column, value) "" else return value unless value.respond_to?(:valid_encoding?) - sanitized_value = "" + sanitized_value = +"" value = fix_encoding(value) value.each_char do |char| if char.valid_encoding? diff --git a/lib/groonga/patricia-trie.rb b/lib/groonga/patricia-trie.rb index 44e98051..3b99289c 100644 --- a/lib/groonga/patricia-trie.rb +++ b/lib/groonga/patricia-trie.rb @@ -1,6 +1,4 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2009-2010 Kouhei Sutou +# Copyright (C) 2009-2025 Sutou Kouhei # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -55,7 +53,7 @@ def tag_keys(text, options={}) options ||= {} other_text_handler = options[:other_text_handler] position = 0 - result = '' + result = +"" if text.respond_to?(:encoding) encoding = text.encoding bytes = text.dup.force_encoding("ascii-8bit") diff --git a/test/test-database-inspector.rb b/test/test-database-inspector.rb index f5042f91..60b305c6 100644 --- a/test/test-database-inspector.rb +++ b/test/test-database-inspector.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2013 Kouhei Sutou +# Copyright (C) 2013-2025 Sutou Kouhei # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -131,7 +131,7 @@ def inspect_columns(columns) None INSPECTED else - inspected = " Columns:\n" + inspected = +" Columns:\n" columns.each do |column| inspected << inspect_column(column) end @@ -270,7 +270,7 @@ def test_has_tables private def inspected(n_tables) - inspected_tables = " Tables:\n" + inspected_tables = +" Tables:\n" if @database.tables.empty? inspected_tables << " None\n" else diff --git a/test/test-schema-dumper.rb b/test/test-schema-dumper.rb index cbf1e260..1b92fbe7 100644 --- a/test/test-schema-dumper.rb +++ b/test/test-schema-dumper.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2016 Kouhei Sutou +# Copyright (C) 2009-2025 Sutou Kouhei # Copyright (C) 2014-2016 Masafumi Yokoyama # # This library is free software; you can redistribute it and/or @@ -427,7 +427,7 @@ def test_double_array_trie class ColumnCompressionTest < self def test_zlib define_column_compression_zlib_schema - flags = "COLUMN_SCALAR" + flags = +"COLUMN_SCALAR" flags << "|COMPRESS_ZLIB" if context.support_zlib? assert_equal(<<-SCHEMA, dump) table_create Posts TABLE_NO_KEY @@ -437,7 +437,7 @@ def test_zlib def test_lz4 define_column_compression_lz4_schema - flags = "COLUMN_SCALAR" + flags = +"COLUMN_SCALAR" flags << "|COMPRESS_LZ4" if context.support_lz4? assert_equal(<<-SCHEMA, dump) table_create Posts TABLE_NO_KEY @@ -447,7 +447,7 @@ def test_lz4 def test_zstd define_column_compression_zstd_schema - flags = "COLUMN_SCALAR" + flags = +"COLUMN_SCALAR" flags << "|COMPRESS_ZSTD" if context.support_zstd? assert_equal(<<-SCHEMA, dump) table_create Posts TABLE_NO_KEY @@ -457,7 +457,7 @@ def test_zstd def test_with_weight_vector define_column_compression_with_weight_vector_schema - flags = "COLUMN_VECTOR|WITH_WEIGHT" + flags = +"COLUMN_VECTOR|WITH_WEIGHT" flags << "|COMPRESS_ZLIB" if context.support_zlib? assert_equal(<<-SCHEMA, dump) table_create Posts TABLE_NO_KEY