summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-03-23 02:13:28 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-03-23 02:13:28 +0900
commit1c056829298479168cf4db8f1ebdd248149fef70 (patch)
tree142c1b57efb695f29f160155db676c385fb26bb5
parentf7573303676ddceafd1dd02ac82060463b161d5c (diff)
test/ruby/test_m17n.rb: Make the debugging code print to stderr
The test is executed with -j8, so printing someting to stdout may break.
-rw-r--r--test/ruby/test_m17n.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index c21f411..321a356 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -315,27 +315,27 @@ class TestM17N < Test::Unit::TestCase
begin
"abc".encode(Encoding.default_external)
rescue Encoding::CompatibilityError
- p :debug_1
- p $!
- p *$!.backtrace
- p "abc".encoding
- p Encoding.default_external
+ $stderr.puts :debug_1.inspect
+ $stderr.puts $!.inspect
+ $stderr.puts *$!.backtrace
+ $stderr.puts "abc".encoding.inspect
+ $stderr.puts Encoding.default_external.inspect
end
begin
[o].inspect
rescue Encoding::CompatibilityError
- p :debug_2
- p $!
- p *$!.backtrace
- p "abc".encoding
- p Encoding.default_external
+ $stderr.puts :debug_2.inspect
+ $stderr.puts $!.inspect
+ $stderr.puts *$!.backtrace
+ $stderr.puts "abc".encoding.inspect
+ $stderr.puts Encoding.default_external.inspect
begin
- p o.inspect
- p :debug_3
+ $stderr.puts o.inspect.inspect
+ $stderr.puts :debug_3.inspect
rescue Encoding::CompatibilityError
- p :debug_4
- p $!
- p *$!.backtrace
+ $stderr.puts :debug_4.inspect
+ $stderr.puts $!.inspect
+ $stderr.puts *$!.backtrace
end
end
# debugging code end