Skip to content

Commit

Permalink
[ruby/rdoc] Remove unused method `RDoc::Encoding.remove_frozen_string…
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 15, 2023
1 parent f388145 commit b257181
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/rdoc/encoding.rb
Expand Up @@ -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

Expand Down

0 comments on commit b257181

Please sign in to comment.