-
Notifications
You must be signed in to change notification settings - Fork 43
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
6 changed files
with
58 additions
and
10 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,3 +1,19 @@ | ||
# Copyright (C) 2004-2024 Sutou Kouhei <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
|
||
require "rabbit/source/base" | ||
|
||
module Rabbit | ||
|
@@ -21,7 +37,7 @@ def _read | |
@argf.read | ||
rescue | ||
@logger.error($!.message) | ||
"" | ||
+"" | ||
end | ||
end | ||
end | ||
|
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,3 +1,19 @@ | ||
# Copyright (C) 2004-2024 Sutou Kouhei <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
|
||
require 'rabbit/source/base' | ||
|
||
module Rabbit | ||
|
@@ -25,7 +41,7 @@ def _read | |
rescue SourceUnreadableError | ||
@logger.error($!.message) | ||
@mtime = Time.now + LimitAccessInterval::MINIMUM_ACCESS_TIME | ||
"" | ||
+"" | ||
end | ||
end | ||
|
||
|
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,3 +1,19 @@ | ||
# Copyright (C) 2004-2024 Sutou Kouhei <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
|
||
require "uri" | ||
require "open-uri" | ||
|
||
|
@@ -52,7 +68,7 @@ def _read | |
rescue | ||
@logger.error($!.message) | ||
@last_modified = Time.now + MINIMUM_ACCESS_TIME | ||
"" | ||
+"" | ||
end | ||
end | ||
|
||
|
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) 2014-2019 Kouhei Sutou <[email protected]> | ||
# Copyright (C) 2014-2024 Sutou Kouhei <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -32,11 +32,11 @@ def match?(content) | |
end | ||
|
||
def test_with_space | ||
assert_true(match?("= Hello")) | ||
assert_true(match?(+"= Hello")) | ||
end | ||
|
||
def test_no_space | ||
assert_true(match?("=Hello")) | ||
assert_true(match?(+"=Hello")) | ||
end | ||
end | ||
end | ||
|
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) 2015-2019 Kouhei Sutou <[email protected]> | ||
# Copyright (C) 2015-2024 Sutou Kouhei <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -34,7 +34,7 @@ class ImageTest < self | |
class InlineTest < self | ||
test "unsupported" do | ||
image_path = fixture_path("image/png/lavie.png") | ||
wiki_text = <<-WIKI | ||
wiki_text = +<<-WIKI | ||
! Title | ||
! Slide | ||
|
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) 2004-2019 Kouhei Sutou <[email protected]> | ||
# Copyright (C) 2004-2024 Kouhei Sutou <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -35,7 +35,7 @@ def guess_encoding(string) | |
|
||
class ReadTest < self | ||
def test_binary | ||
pdf_header = "%PDF-1.5\n%\xb5\xed\xae\xfb\n" | ||
pdf_header = +"%PDF-1.5\n%\xb5\xed\xae\xfb\n" | ||
pdf_header.force_encoding("ASCII-8BIT") | ||
assert_equal(pdf_header, read(pdf_header)) | ||
end | ||
|