mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
Revert "fix string interpolation error when transforming characters to UTF8 in the configuration compiler"
This reverts commit 65c789a24c
.
Fixes #3264
This commit is contained in:
parent
65c789a24c
commit
26f6be3aed
2 changed files with 1 additions and 14 deletions
|
@ -300,7 +300,7 @@ module LogStash; module Config; module AST
|
|||
|
||||
module Unicode
|
||||
def self.wrap(text)
|
||||
return "('#{text.force_encoding(Encoding::UTF_8)}')"
|
||||
return "(" + text.force_encoding(Encoding::UTF_8).inspect + ")"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -106,16 +106,3 @@ describe LogStashConfigParser do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe LogStash::Config::AST do
|
||||
|
||||
context "when doing unicode transformations" do
|
||||
subject(:unicode) { LogStash::Config::AST::Unicode }
|
||||
|
||||
it "convert newline characters without modifying them" do
|
||||
expect(unicode.wrap("\\n")).to eq("('\\n')")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue