summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2016-04-24 02:31:53 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2016-04-24 02:53:39 +0900
commit39b6654d6f68b8431ac79e12e852b6448bc4fe79 (patch)
tree6773c5c0871395d37816e6b10a642f89e2a46b26
parente7fe550e6e0b9d963908406ccc46a374789c92b6 (diff)
downloadjson-39b6654d6f68b8431ac79e12e852b6448bc4fe79.tar.gz
Add frozen_string_literal: false
When you change this to true, you may need to add more tests.
-rw-r--r--lib/json.rb1
-rw-r--r--lib/json/add/bigdecimal.rb1
-rw-r--r--lib/json/add/complex.rb1
-rw-r--r--lib/json/add/core.rb1
-rw-r--r--lib/json/add/date.rb1
-rw-r--r--lib/json/add/date_time.rb1
-rw-r--r--lib/json/add/exception.rb1
-rw-r--r--lib/json/add/ostruct.rb1
-rw-r--r--lib/json/add/range.rb1
-rw-r--r--lib/json/add/rational.rb1
-rw-r--r--lib/json/add/regexp.rb1
-rw-r--r--lib/json/add/struct.rb1
-rw-r--r--lib/json/add/symbol.rb1
-rw-r--r--lib/json/add/time.rb1
-rw-r--r--lib/json/common.rb1
-rw-r--r--lib/json/ext.rb1
-rw-r--r--lib/json/generic_object.rb1
-rw-r--r--lib/json/pure.rb1
-rw-r--r--lib/json/pure/generator.rb1
-rw-r--r--lib/json/pure/parser.rb1
-rw-r--r--lib/json/version.rb1
-rw-r--r--tests/json_addition_test.rb1
-rw-r--r--tests/json_common_interface_test.rb1
-rw-r--r--tests/json_encoding_test.rb1
-rw-r--r--tests/json_ext_parser_test.rb1
-rw-r--r--tests/json_fixtures_test.rb1
-rw-r--r--tests/json_generic_object_test.rb1
-rw-r--r--tests/json_parser_test.rb1
-rw-r--r--tests/json_string_matching_test.rb1
29 files changed, 29 insertions, 0 deletions
diff --git a/lib/json.rb b/lib/json.rb
index 24aa385..b5a6912 100644
--- a/lib/json.rb
+++ b/lib/json.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'json/common'
##
diff --git a/lib/json/add/bigdecimal.rb b/lib/json/add/bigdecimal.rb
index 0ef69f1..539daee 100644
--- a/lib/json/add/bigdecimal.rb
+++ b/lib/json/add/bigdecimal.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/complex.rb b/lib/json/add/complex.rb
index 3d653bb..28ef734 100644
--- a/lib/json/add/complex.rb
+++ b/lib/json/add/complex.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/core.rb b/lib/json/add/core.rb
index 77d9dc0..bfb017c 100644
--- a/lib/json/add/core.rb
+++ b/lib/json/add/core.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
# This file requires the implementations of ruby core's custom objects for
# serialisation/deserialisation.
diff --git a/lib/json/add/date.rb b/lib/json/add/date.rb
index 4288237..6a9f16e 100644
--- a/lib/json/add/date.rb
+++ b/lib/json/add/date.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/date_time.rb b/lib/json/add/date_time.rb
index 5ea42ea..0edeeda 100644
--- a/lib/json/add/date_time.rb
+++ b/lib/json/add/date_time.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/exception.rb b/lib/json/add/exception.rb
index e6ad257..d6ecfed 100644
--- a/lib/json/add/exception.rb
+++ b/lib/json/add/exception.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/ostruct.rb b/lib/json/add/ostruct.rb
index da81e10..b8bf8ed 100644
--- a/lib/json/add/ostruct.rb
+++ b/lib/json/add/ostruct.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/range.rb b/lib/json/add/range.rb
index e61e553..d9c97dd 100644
--- a/lib/json/add/range.rb
+++ b/lib/json/add/range.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/rational.rb b/lib/json/add/rational.rb
index ee39c20..356940b 100644
--- a/lib/json/add/rational.rb
+++ b/lib/json/add/rational.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/regexp.rb b/lib/json/add/regexp.rb
index 2fcbb6f..df945ba 100644
--- a/lib/json/add/regexp.rb
+++ b/lib/json/add/regexp.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/struct.rb b/lib/json/add/struct.rb
index 6847cde..2180207 100644
--- a/lib/json/add/struct.rb
+++ b/lib/json/add/struct.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/symbol.rb b/lib/json/add/symbol.rb
index 03dc9a5..1f07bf7 100644
--- a/lib/json/add/symbol.rb
+++ b/lib/json/add/symbol.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/add/time.rb b/lib/json/add/time.rb
index d983467..d0cb97d 100644
--- a/lib/json/add/time.rb
+++ b/lib/json/add/time.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
diff --git a/lib/json/common.rb b/lib/json/common.rb
index 1215d41..57001b5 100644
--- a/lib/json/common.rb
+++ b/lib/json/common.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'json/version'
require 'json/generic_object'
diff --git a/lib/json/ext.rb b/lib/json/ext.rb
index c5f8131..44c2b65 100644
--- a/lib/json/ext.rb
+++ b/lib/json/ext.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
if ENV['SIMPLECOV_COVERAGE'].to_i == 1
require 'simplecov'
SimpleCov.start do
diff --git a/lib/json/generic_object.rb b/lib/json/generic_object.rb
index 3a14f0e..6c8f039 100644
--- a/lib/json/generic_object.rb
+++ b/lib/json/generic_object.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'ostruct'
module JSON
diff --git a/lib/json/pure.rb b/lib/json/pure.rb
index b68668b..6bee334 100644
--- a/lib/json/pure.rb
+++ b/lib/json/pure.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
if ENV['SIMPLECOV_COVERAGE'].to_i == 1
require 'simplecov'
SimpleCov.start do
diff --git a/lib/json/pure/generator.rb b/lib/json/pure/generator.rb
index cc8b0fd..fdb0e2a 100644
--- a/lib/json/pure/generator.rb
+++ b/lib/json/pure/generator.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
module JSON
MAP = {
"\x0" => '\u0000',
diff --git a/lib/json/pure/parser.rb b/lib/json/pure/parser.rb
index c5d1501..f80e3b2 100644
--- a/lib/json/pure/parser.rb
+++ b/lib/json/pure/parser.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'strscan'
module JSON
diff --git a/lib/json/version.rb b/lib/json/version.rb
index b91ccd7..b4d1b3b 100644
--- a/lib/json/version.rb
+++ b/lib/json/version.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
module JSON
# JSON version
VERSION = '2.0.0'
diff --git a/tests/json_addition_test.rb b/tests/json_addition_test.rb
index cb07659..a028e0f 100644
--- a/tests/json_addition_test.rb
+++ b/tests/json_addition_test.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'test_helper'
require 'json/add/core'
require 'json/add/complex'
diff --git a/tests/json_common_interface_test.rb b/tests/json_common_interface_test.rb
index 6e02310..b09f857 100644
--- a/tests/json_common_interface_test.rb
+++ b/tests/json_common_interface_test.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'test_helper'
require 'stringio'
require 'tempfile'
diff --git a/tests/json_encoding_test.rb b/tests/json_encoding_test.rb
index 588e9a2..080c3ec 100644
--- a/tests/json_encoding_test.rb
+++ b/tests/json_encoding_test.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'test_helper'
class JSONEncodingTest < Test::Unit::TestCase
diff --git a/tests/json_ext_parser_test.rb b/tests/json_ext_parser_test.rb
index da3bdc1..761ae5e 100644
--- a/tests/json_ext_parser_test.rb
+++ b/tests/json_ext_parser_test.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'test_helper'
require 'stringio'
require 'tempfile'
diff --git a/tests/json_fixtures_test.rb b/tests/json_fixtures_test.rb
index 0419983..01954fe 100644
--- a/tests/json_fixtures_test.rb
+++ b/tests/json_fixtures_test.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'test_helper'
class JSONFixturesTest < Test::Unit::TestCase
diff --git a/tests/json_generic_object_test.rb b/tests/json_generic_object_test.rb
index 171fdb8..82742dc 100644
--- a/tests/json_generic_object_test.rb
+++ b/tests/json_generic_object_test.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'test_helper'
class JSONGenericObjectTest < Test::Unit::TestCase
diff --git a/tests/json_parser_test.rb b/tests/json_parser_test.rb
index ee28578..3ccf6b8 100644
--- a/tests/json_parser_test.rb
+++ b/tests/json_parser_test.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'test_helper'
require 'stringio'
require 'tempfile'
diff --git a/tests/json_string_matching_test.rb b/tests/json_string_matching_test.rb
index 7fec841..5d55dc3 100644
--- a/tests/json_string_matching_test.rb
+++ b/tests/json_string_matching_test.rb
@@ -1,3 +1,4 @@
+#frozen_string_literal: false
require 'test_helper'
require 'time'