Skip to content

Commit

Permalink
Add a spec of beginless range for Ruby 2.7
Browse files Browse the repository at this point in the history
This PR adds a spec of beginless range for Ruby 2.7.

https://bugs.ruby-lang.org/issues/14799
  • Loading branch information
koic authored and bbatsov committed Jan 4, 2020
1 parent 6d0907b commit b6bda3f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/rubocop/ast/range_node_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,15 @@
it { expect(range_node.is_a?(described_class)).to be(true) }
it { expect(range_node.range_type?).to be(true) }
end

context 'with a beiginless range' do
let(:ruby_version) { 2.7 }
let(:source) do
'..42'
end

it { expect(range_node.is_a?(described_class)).to be(true) }
it { expect(range_node.range_type?).to be(true) }
end
end
end

0 comments on commit b6bda3f

Please sign in to comment.