diff options
author | eileencodes <[email protected]> | 2021-09-29 16:06:40 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:42 -0400 |
commit | c8e157bb5c9553e7b444921878044996a1c24ca0 (patch) | |
tree | 85c1e3c7969d02cd0d8c3a09b5b0deaaaacbc7d5 /test | |
parent | 4fc20a8c911793d03107e8eae2042deb028d0d75 (diff) |
Implement getclassvariable in yjit
Co-authored-by: Aaron Patterson <[email protected]>
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_yjit.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index e00f15ecf5..d7dd599205 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -8,6 +8,11 @@ return unless YJIT.enabled? # Tests for YJIT with assertions on compilation and side exits # insipired by the MJIT tests in test/ruby/test_jit.rb class TestYJIT < Test::Unit::TestCase + def test_compile_getclassvariable + script = 'class Foo; @@foo = 1; def self.foo; @@foo; end; end; Foo.foo' + assert_compiles(script, insns: %i[getclassvariable], result: 1) + end + def test_compile_putnil assert_compiles('nil', insns: %i[putnil], result: nil) end |