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

ruby-changes:55249

From: k0kubun <ko1@a...>
Date: Sat, 6 Apr 2019 11:35:43 +0900 (JST)
Subject: [ruby-changes:55249] k0kubun:r67456 (trunk): Resurrect a test dropped in r67442

k0kubun	2019-04-06 11:35:37 +0900 (Sat, 06 Apr 2019)

  New Revision: 67456

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67456

  Log:
    Resurrect a test dropped in r67442

  Modified files:
    trunk/test/ruby/test_jit.rb
Index: test/ruby/test_jit.rb
===================================================================
--- test/ruby/test_jit.rb	(revision 67455)
+++ test/ruby/test_jit.rb	(revision 67456)
@@ -183,6 +183,18 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L183
     assert_compile_once('2', result_inspect: '2', insns: %i[putobject])
   end
 
+  def test_compile_insn_definemethod
+    assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: 'hellohello', success_count: 2, insns: %i[definemethod])
+    begin;
+      print 2.times.map {
+        def method_definition
+          'hello'
+        end
+        method_definition
+      }.join
+    end;
+  end
+
   def test_compile_insn_putstring_concatstrings_tostring
     assert_compile_once('"a#{}b" + "c"', result_inspect: '"abc"', insns: %i[putstring concatstrings tostring])
   end

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

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