Skip to content

Commit

Permalink
Remove unused method RDoc::Encoding.remove_frozen_string_literal
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 15, 2023
1 parent 823241e commit 7a8e9a9
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/rdoc/encoding.rb
Original file line number Diff line number Diff line change
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 7a8e9a9

Please sign in to comment.