From 7a8e9a97fae2941c9c99a52dd37a8fd1a9798723 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 15 Dec 2023 19:20:47 +0900 Subject: [PATCH] Remove unused method `RDoc::Encoding.remove_frozen_string_literal` --- lib/rdoc/encoding.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/rdoc/encoding.rb b/lib/rdoc/encoding.rb index 8a921c7011..67e190f782 100644 --- a/lib/rdoc/encoding.rb +++ b/lib/rdoc/encoding.rb @@ -86,17 +86,6 @@ def self.read_file filename, encoding, force_transcode = false nil end - def self.remove_frozen_string_literal string - string =~ /\A(?:#!.*\n)?(.*\n)/ - first_line = $1 - - if first_line =~ /\A# +frozen[-_]string[-_]literal[=:].+$/i - string = string.sub first_line, '' - end - - string - end - ## # Detects the encoding of +string+ based on the magic comment