From 4d1163b182bdd572edaa44ff000240d49acc09d6 Mon Sep 17 00:00:00 2001
From: k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Sat, 6 Apr 2019 02:35:37 +0000
Subject: [PATCH] Resurrect a test dropped in r67442

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 test/ruby/test_jit.rb | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 332d6fc2ed..9380ee98e1 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -183,6 +183,18 @@ class TestJIT < Test::Unit::TestCase
     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