diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-05 13:27:48 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-05 13:27:48 +0000 |
commit | 40ae6aaa1372aea4235ebaa4d896e1207015b517 (patch) | |
tree | 81b4d726b3ee9e06afa2f0781dfbad263c62dbff /test/test_prettyprint.rb | |
parent | ad3b5a7ffe37a989d19ac902c46ecd81c66b0d7b (diff) | |
download | ruby-40ae6aaa1372aea4235ebaa4d896e1207015b517.tar.gz |
* 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 'test/test_prettyprint.rb')
-rw-r--r-- | test/test_prettyprint.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/test_prettyprint.rb b/test/test_prettyprint.rb index 1d6b75a569..0d087b4a78 100644 --- a/test/test_prettyprint.rb +++ b/test/test_prettyprint.rb @@ -1,3 +1,5 @@ +# -*- frozen_string_literal: true -*- + require 'prettyprint' require 'test/unit' @@ -14,7 +16,7 @@ class WadlerExample < Test::Unit::TestCase # :nodoc: end def hello(width) - PrettyPrint.format('', width) {|hello| + PrettyPrint.format(''.dup, width) {|hello| hello.group { hello.group { hello.group { @@ -81,7 +83,7 @@ End end def tree(width) - PrettyPrint.format('', width) {|q| @tree.show(q)} + PrettyPrint.format(''.dup, width) {|q| @tree.show(q)} end def test_tree_00_19 @@ -126,7 +128,7 @@ End end def tree_alt(width) - PrettyPrint.format('', width) {|q| @tree.altshow(q)} + PrettyPrint.format(''.dup, width) {|q| @tree.altshow(q)} end def test_tree_alt_00_18 @@ -242,7 +244,7 @@ end class StrictPrettyExample < Test::Unit::TestCase # :nodoc: def prog(width) - PrettyPrint.format('', width) {|q| + PrettyPrint.format(''.dup, width) {|q| q.group { q.group {q.nest(2) { q.text "if"; q.breakable; @@ -387,7 +389,7 @@ end class TailGroup < Test::Unit::TestCase # :nodoc: def test_1 - out = PrettyPrint.format('', 10) {|q| + out = PrettyPrint.format(''.dup, 10) {|q| q.group { q.group { q.text "abc" @@ -426,7 +428,7 @@ end class Fill < Test::Unit::TestCase # :nodoc: def format(width) - PrettyPrint.format('', width) {|q| + PrettyPrint.format(''.dup, width) {|q| q.group { q.text 'abc' q.fill_breakable |