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

ruby-changes:60303

From: Charles <ko1@a...>
Date: Fri, 6 Mar 2020 07:49:49 +0900 (JST)
Subject: [ruby-changes:60303] e57dd8c2b5 (master): Mask RubyVM-specific test

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

From e57dd8c2b52557f5564b9a1d9d38df66e4d090c9 Mon Sep 17 00:00:00 2001
From: Charles Oliver Nutter <headius@h...>
Date: Thu, 5 Mar 2020 16:48:52 -0600
Subject: Mask RubyVM-specific test


diff --git a/test/test_pp.rb b/test/test_pp.rb
index 3434c2b..4aa3195 100644
--- a/test/test_pp.rb
+++ b/test/test_pp.rb
@@ -211,12 +211,14 @@ class PPFileStatTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pp.rb#L211
   end
 end
 
-class PPAbstractSyntaxTree < Test::Unit::TestCase
-  AST = RubyVM::AbstractSyntaxTree
-  def test_lasgn_literal
-    ast = AST.parse("_=1")
-    expected = "(SCOPE@1:0-1:3 tbl: [:_] args: nil body: (LASGN@1:0-1:3 :_ (LIT@1:2-1:3 1)))"
-    assert_equal(expected, PP.singleline_pp(ast, ''.dup), ast)
+if defined?(RubyVM)
+  class PPAbstractSyntaxTree < Test::Unit::TestCase
+    AST = RubyVM::AbstractSyntaxTree
+    def test_lasgn_literal
+      ast = AST.parse("_=1")
+      expected = "(SCOPE@1:0-1:3 tbl: [:_] args: nil body: (LASGN@1:0-1:3 :_ (LIT@1:2-1:3 1)))"
+      assert_equal(expected, PP.singleline_pp(ast, ''.dup), ast)
+    end
   end
 end
 
-- 
cgit v0.10.2


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

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