1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
akr 2015-10-05 13:27:48 +00:00
parent fab171e541
commit 805c20a8e5
8 changed files with 73 additions and 44 deletions

View file

@ -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