Skip to content

Commit 1d8eca8

Browse files
author
Zachary Scott
committed
Add frozen_string_literal from ruby/ruby@3e92b63
Using the following script: ```bash grep -L frozen_string_literal lib/**/*.rb test/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' ```
1 parent c9865cf commit 1d8eca8

File tree

127 files changed

+127
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+127
-0
lines changed

lib/rdoc/alias.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
##
23
# Represent an alias, which is an old_name/new_name pair associated with a
34
# particular context

lib/rdoc/anon_class.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
##
23
# An anonymous class like:
34
#

lib/rdoc/any_method.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
##
23
# AnyMethod is the base class for objects representing methods
34

lib/rdoc/attr.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
##
23
# An attribute created by \#attr, \#attr_reader, \#attr_writer or
34
# \#attr_accessor

lib/rdoc/class_module.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
##
23
# ClassModule is the base class for objects representing either a class or a
34
# module.

lib/rdoc/code_object.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
##
23
# Base class for the RDoc code tree.
34
#

lib/rdoc/code_objects.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
# This file was used to load all the RDoc::CodeObject subclasses at once. Now
23
# autoload handles this.
34

lib/rdoc/comment.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
##
23
# A comment holds the text comment for a RDoc::CodeObject and provides a
34
# unified way of cleaning it up and parsing it into an RDoc::Markup::Document.

lib/rdoc/constant.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
##
23
# A constant
34

lib/rdoc/context.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: false
12
require 'cgi'
23

34
##

0 commit comments

Comments
 (0)