diff options
author | Kyrylo Silin <silin@kyrylo.org> | 2021-06-28 22:31:53 +0300 |
---|---|---|
committer | Kyrylo Silin <silin@kyrylo.org> | 2021-06-28 22:33:20 +0300 |
commit | 0c677b7a1db3e204e78ac682487e8c6345c7f64b (patch) | |
tree | 6271741080acc0d553063678ccdf5ad8693df546 /spec | |
parent | 0aae8c94ad03a732659ed56dcd5088469a15eebf (diff) | |
download | pry-0c677b7a1db3e204e78ac682487e8c6345c7f64b.tar.gz |
ring: change guard priority so that the value at index can be read
Fixes #2199 (`_out_` Ring is ill-addressible)
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ring_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ring_spec.rb b/spec/ring_spec.rb index 4c7efbb5..3d5572ae 100644 --- a/spec/ring_spec.rb +++ b/spec/ring_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true describe Pry::Ring do - let(:ring) { described_class.new(3) } + subject(:ring) { described_class.new(3) } describe "#<<" do it "adds elements as is when the ring is not full" do @@ -28,6 +28,8 @@ describe Pry::Ring do end context "when the ring is not full" do + subject(:ring) { described_class.new(100) } + before { ring << 1 << 2 << 3 } it "reads elements" do |