summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-08-17 17:21:56 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 16:21:42 +0900
commit424afa4446b78e918c11b644451d3f25217084c5 (patch)
treef1ae12e517fa0fe634b02eadb65b30664baf1f25 /include
parent02e69d1c2cce62850ecbd0ca0e8af564286cc55c (diff)
downloadmruby-424afa4446b78e918c11b644451d3f25217084c5.tar.gz
mruby-424afa4446b78e918c11b644451d3f25217084c5.zip
Make `Proc#parameters` to support keyword arguments; fix #5066
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/proc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mruby/proc.h b/include/mruby/proc.h
index c14c1ff9c..981e1111d 100644
--- a/include/mruby/proc.h
+++ b/include/mruby/proc.h
@@ -57,7 +57,7 @@ struct RProc {
#define MRB_ASPEC_REST(a) (((a) >> 12) & 0x1)
#define MRB_ASPEC_POST(a) (((a) >> 7) & 0x1f)
#define MRB_ASPEC_KEY(a) (((a) >> 2) & 0x1f)
-#define MRB_ASPEC_KDICT(a) ((a) & (1<<1))
+#define MRB_ASPEC_KDICT(a) (((a) >> 1) & 0x1)
#define MRB_ASPEC_BLOCK(a) ((a) & 1)
#define MRB_PROC_CFUNC_FL 128