Skip to content

Commit

Permalink
add magic comment for frozen string literals to all files
Browse files Browse the repository at this point in the history
related to #118
  • Loading branch information
flavorjones committed Nov 25, 2019
1 parent 5ce3a71 commit 0783f5b
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions concourse/tasks/rake-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ set -e -x -u

pushd loofah

# TODO: remove this once fefc629 (2019-11-25) is far enough in the past
export RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"

bundle install
bundle exec rake test

Expand Down
1 change: 1 addition & 0 deletions lib/loofah.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))

require "nokogiri"
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/elements.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'set'

module Loofah
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/helpers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Loofah
module Helpers
class << self
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/html/document.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Loofah
module HTML # :nodoc:
#
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/html/document_fragment.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Loofah
module HTML # :nodoc:
#
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/html5/libxml2_workarounds.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# coding: utf-8
# frozen_string_literal: true
require 'set'

module Loofah
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/html5/safelist.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "set"

module Loofah
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/html5/scrub.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cgi'
require 'crass'

Expand Down
1 change: 1 addition & 0 deletions lib/loofah/instance_methods.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Loofah
#
# Mixes +scrub!+ into Document, DocumentFragment, Node and NodeSet.
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/metahelpers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Loofah
module MetaHelpers # :nodoc:
def self.add_downcased_set_members_to_all_set_constants mojule
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/scrubber.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Loofah
#
# A RuntimeError raised when Loofah could not find an appropriate scrubber.
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/scrubbers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Loofah
#
# Loofah provides some built-in scrubbers for sanitizing with
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/xml/document.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Loofah
module XML # :nodoc:
#
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/xml/document_fragment.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Loofah
module XML # :nodoc:
#
Expand Down

0 comments on commit 0783f5b

Please sign in to comment.