[前][次][番号順一覧][スレッド一覧]

ruby-changes:58365

From: Nobuyoshi <ko1@a...>
Date: Wed, 23 Oct 2019 01:13:18 +0900 (JST)
Subject: [ruby-changes:58365] 801a11d0ab (master): Relaxed tests for CPDEBUG mode

https://git.ruby-lang.org/ruby.git/commit/?id=801a11d0ab

From 801a11d0ab3e1d387b5aaed92d1965fbdf675780 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 23 Oct 2019 01:05:14 +0900
Subject: Relaxed tests for CPDEBUG mode


diff --git a/bootstraptest/test_eval.rb b/bootstraptest/test_eval.rb
index 8e90ac2..fa04323 100644
--- a/bootstraptest/test_eval.rb
+++ b/bootstraptest/test_eval.rb
@@ -190,7 +190,8 @@ assert_equal %q{[10, main]}, %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_eval.rb#L190
 }
 
 %w[break next redo].each do |keyword|
-  assert_match %r"Can't escape from eval with #{keyword}\z", %{
+  assert_match %r"Can't escape from eval with #{keyword}\b", %{
+    STDERR.reopen(STDOUT)
     begin
       eval "0 rescue #{keyword}"
     rescue SyntaxError => e
diff --git a/bootstraptest/test_jump.rb b/bootstraptest/test_jump.rb
index 595aaa7..7944915 100644
--- a/bootstraptest/test_jump.rb
+++ b/bootstraptest/test_jump.rb
@@ -146,15 +146,16 @@ assert_equal %q{131}, %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_jump.rb#L146
     end
   }
 }
-assert_equal %q{ok}, %q{
+assert_match %r{Invalid retry}, %q{
+STDERR.reopen(STDOUT)
 begin
   eval %q{
     1.times{
       retry
     }
   }
-rescue SyntaxError
-  :ok
+rescue SyntaxError => e
+  e.message
 end
 }
 assert_equal %q{3}, %q{
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]