-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress literal string will be frozen warnings
- Loading branch information
Showing
5 changed files
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2010-2016 Kouhei Sutou <[email protected]> | ||
# Copyright (C) 2010-2025 Sutou Kouhei <[email protected]> | ||
# | ||
# 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2011-2016 Kouhei Sutou <[email protected]> | ||
# Copyright (C) 2011-2025 Sutou Kouhei <[email protected]> | ||
# Copyright (C) 2014 Masafumi Yokoyama <[email protected]> | ||
# | ||
# 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? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2009-2010 Kouhei Sutou <[email protected]> | ||
# Copyright (C) 2009-2025 Sutou Kouhei <[email protected]> | ||
# | ||
# 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") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2013 Kouhei Sutou <[email protected]> | ||
# Copyright (C) 2013-2025 Sutou Kouhei <[email protected]> | ||
# | ||
# 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2009-2016 Kouhei Sutou <[email protected]> | ||
# Copyright (C) 2009-2025 Sutou Kouhei <[email protected]> | ||
# Copyright (C) 2014-2016 Masafumi Yokoyama <[email protected]> | ||
# | ||
# 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 | ||
|