From b257181ccc9cf46cfcbe085083f3ebffcd8abf09 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 15 Dec 2023 19:20:47 +0900 Subject: [PATCH] [ruby/rdoc] Remove unused method `RDoc::Encoding.remove_frozen_string_literal` https://github.com/ruby/rdoc/commit/7a8e9a97fa --- lib/rdoc/encoding.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/rdoc/encoding.rb b/lib/rdoc/encoding.rb index 8a921c7011fa42..67e190f7820e09 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