summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/excludes/_wercker/test-mjit-wait/TestGemStreamUI.rb2
-rw-r--r--test/ruby/test_jit.rb21
2 files changed, 21 insertions, 2 deletions
diff --git a/test/excludes/_wercker/test-mjit-wait/TestGemStreamUI.rb b/test/excludes/_wercker/test-mjit-wait/TestGemStreamUI.rb
deleted file mode 100644
index 56edf339b2..0000000000
--- a/test/excludes/_wercker/test-mjit-wait/TestGemStreamUI.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-# debugging this right now
-exclude(/.*/, 'this fails with --jit-wait')
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 888290faa9..5c31b504c4 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -669,6 +669,27 @@ class TestJIT < Test::Unit::TestCase
end;
end
+ def test_inlined_undefined_ivar
+ assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "bbb", success_count: 2, min_calls: 3)
+ begin;
+ class Foo
+ def initialize
+ @a = :a
+ end
+
+ def bar
+ if @b.nil?
+ @b = :b
+ end
+ end
+ end
+
+ print(Foo.new.bar)
+ print(Foo.new.bar)
+ print(Foo.new.bar)
+ end;
+ end
+
def test_attr_reader
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "4nil\nnil\n6", success_count: 2, min_calls: 2)
begin;