diff options
author | eileencodes <eileencodes@gmail.com> | 2021-07-27 14:57:30 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:38 -0400 |
commit | b91078ea743fda959ad42f17562c4f3091bcf585 (patch) | |
tree | e1f19c0a92ea733f5e102c99767aae23065fd426 /bootstraptest | |
parent | dd23e4658b8587adf8d6fed96b574a979b169e46 (diff) |
Add setglobal to yjit
Adds yjit support for setting global variables.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Co-authored-by: John Hawthorn <john@hawthorn.email>
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_yjit.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 91b63cf076..1a683c1c41 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -1,5 +1,13 @@ -# Check that global variables work +# Check that global variable set works +assert_equal 'string', %q{ + def foo + $foo = "string" + end + foo +} + +# Check that global variables work assert_equal 'string', %q{ $foo = "string" |