From 50029fb127c38b345dc781ea8f67bfc372cc5390 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Tue, 27 Jul 2021 13:48:33 -0400 Subject: Add getglobal to yjit Adds getglobal to yjit and a test for it. Co-authored-by: Aaron Patterson --- bootstraptest/test_yjit.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 9bce707cb5..91b63cf076 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -1,3 +1,15 @@ +# Check that global variables work + +assert_equal 'string', %q{ + $foo = "string" + + def foo + $foo + end + + foo +} + # Check that global tracepoints work assert_equal 'true', %q{ def foo -- cgit v1.2.3