From 67c574736912003c377218153f9d3b9c0c96a17b Mon Sep 17 00:00:00 2001
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Mon, 31 Dec 2018 15:00:37 +0000
Subject: Method reference operator

Introduce the new operator for method reference, `.:`.
[Feature #12125] [Feature #13581]
[EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index a062a9f119..2690539085 100644
--- a/insns.def
+++ b/insns.def
@@ -702,6 +702,16 @@ checktype
     ret = (TYPE(val) == (int)type) ? Qtrue : Qfalse;
 }
 
+/* get method reference. */
+DEFINE_INSN
+methodref
+(ID id)
+(VALUE val)
+(VALUE ret)
+{
+    ret = rb_obj_method(val, ID2SYM(id));
+}
+
 /**********************************************************/
 /* deal with control flow 1: class/module                 */
 /**********************************************************/
-- 
cgit v1.2.3

