summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorHParker <HParker@github.com>2023-12-01 13:25:41 -0800
committerJemma Issroff <jemmaissroff@gmail.com>2023-12-05 12:17:14 -0500
commit9b76c7fc89460ed8e9be40e4037c1d68395c0f6d (patch)
treefc0b1638f528bafd00fce2e09bab32d5977c0947 /vm.c
parent19114014faf9e22c29c105df4d0b7af84c257366 (diff)
allow enabling Prism via flag or env var
Enable Prism using either --prism ruby --prism test.rb or via env var RUBY_PRISM=1 ruby test.rb
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 4cc19f7c23..1c91ada813 100644
--- a/vm.c
+++ b/vm.c
@@ -4192,6 +4192,13 @@ rb_ruby_verbose_ptr(void)
return &cr->verbose;
}
+bool *
+rb_ruby_prism_ptr(void)
+{
+ rb_ractor_t *cr = GET_RACTOR();
+ return &cr->prism;
+}
+
VALUE *
rb_ruby_debug_ptr(void)
{