summaryrefslogtreecommitdiff
path: root/lib/pp.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-05 13:27:48 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-05 13:27:48 +0000
commit805c20a8e59315f15dbb22ac1518de6a27385039 (patch)
tree81b4d726b3ee9e06afa2f0781dfbad263c62dbff /lib/pp.rb
parentfab171e541f7b7373efe386ae956d7a44ce4e330 (diff)
* lib/pp.rb: Use frozen_string_literal: true.
* lib/prettyprint.rb: Ditto. * lib/resolv.rb: Ditto. * lib/tmpdir.rb: Ditto. * test/test_pp.rb: Ditto. * test/test_prettyprint.rb: Ditto. * tool/transcode-tblgen.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pp.rb')
-rw-r--r--lib/pp.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index 3c73463c9c..ef787bb764 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -1,3 +1,5 @@
+# -*- frozen_string_literal: true -*-
+
require 'prettyprint'
module Kernel
@@ -9,7 +11,7 @@ module Kernel
#
# See the PP module for more information.
def pretty_inspect
- PP.pp(self, '')
+ PP.pp(self, ''.dup)
end
private
@@ -347,7 +349,7 @@ class PP < PrettyPrint
if /\(PP::ObjectMixin\)#/ =~ Object.instance_method(:method).bind(self).call(:pretty_print).inspect
raise "pretty_print is not overridden for #{self.class}"
end
- PP.singleline_pp(self, '')
+ PP.singleline_pp(self, ''.dup)
end
end
end