diff options
| author | Jeremy Evans <code@jeremyevans.net> | 2021-08-24 08:34:48 -0700 |
|---|---|---|
| committer | Jeremy Evans <code@jeremyevans.net> | 2021-08-24 08:34:48 -0700 |
| commit | 14a9c364f75a9729d5a49e1fbea08fec2f813bdd (patch) | |
| tree | 32598a9dcbe7b506641e132bd30d4da5baf60944 /test/ruby/test_optimization.rb | |
| parent | bbedd29b6e98ef6e3fc2ce2b358d2b509b7cd1bb (diff) | |
| download | ruby-14a9c364f75a9729d5a49e1fbea08fec2f813bdd.tar.gz | |
Fix warnings in test_optimization.rb
These were introduced in the test for tracing optimized methods
added in 48c8df9e0eb295af06d593ce37ce1933c0ee1d90.
Diffstat (limited to 'test/ruby/test_optimization.rb')
| -rw-r--r-- | test/ruby/test_optimization.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 226fb44261..2075bf3513 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -158,7 +158,7 @@ class TestRubyOptimization < Test::Unit::TestCase methods = [] tp = TracePoint.new(type) { |tp| methods << tp.method_id } tp.enable do - x = "a"; -x + x = "a"; x = -x [1].max [1].min x = 42 + 2 @@ -166,11 +166,11 @@ class TestRubyOptimization < Test::Unit::TestCase x = 42 * 2 x = 42 / 2 x = 42 % 2 - x == 42 - x < 42 - x <= 42 - x > 42 - x >= 42 + y = x == 42 + y = x < 42 + y = x <= 42 + y = x > 42 + y = x >= 42 x = x << 1 x = x & 1 x = x | 1 @@ -182,6 +182,7 @@ class TestRubyOptimization < Test::Unit::TestCase x = 1; x.succ !x x = 'a'; x =~ /a/ + x = y end assert_equal(expected, methods, bug14870) end |
